Browse Source

Fix problem with creating a new account

Lee Morgan 6 năm trước cách đây
mục cha
commit
ee9f64e648
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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("/");