|
@@ -15,7 +15,7 @@ module.exports = {
|
|
|
Merchant.findOne({email: req.body.email.toLowerCase()})
|
|
Merchant.findOne({email: req.body.email.toLowerCase()})
|
|
|
.then((merchant)=>{
|
|
.then((merchant)=>{
|
|
|
if(merchant !== null){
|
|
if(merchant !== null){
|
|
|
- bcrypt.compare(req.body.password, merchant.password, (err, result)=>{
|
|
|
|
|
|
|
+ bcrypt.compare(req.body.password, merchant.password, async (err, result)=>{
|
|
|
if(result === true){
|
|
if(result === true){
|
|
|
//Check if email has not been verified
|
|
//Check if email has not been verified
|
|
|
if(merchant.status.includes("unverified")){
|
|
if(merchant.status.includes("unverified")){
|