فهرست منبع

Fix problem with creating a new account

Lee Morgan 6 سال پیش
والد
کامیت
ee9f64e648
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  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("/");