Explorar o código

Fix problem with creating a new account

Lee Morgan %!s(int64=6) %!d(string=hai) anos
pai
achega
ee9f64e648
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      controllers/merchantData.js

+ 1 - 1
controllers/merchantData.js

@@ -17,7 +17,7 @@ module.exports = {
     Redirects to /dashboard
     */
     createMerchantNone: async function(req, res){
-        let merchant = await Merchant.find({email: req.body.email.toLowerCase()});
+        let merchant = await Merchant.findOne({email: req.body.email.toLowerCase()});
         if(merchant){
             req.session.error = "That email address is already in use";
             return res.redirect("/");