Done!
This commit is contained in:
parent
51238a4d96
commit
812cc70ae9
|
@ -224,6 +224,7 @@ module.exports.postSignin = async (req, res, next) => {
|
|||
console.log("req.body", req.body);
|
||||
let user = await User.findOne({ email });
|
||||
if (isGoogle) {
|
||||
if (user) {
|
||||
user.isVerified = true;
|
||||
user = await user.save();
|
||||
const isMatched = await bcrypt.compare(password, user.password);
|
||||
|
@ -239,6 +240,13 @@ module.exports.postSignin = async (req, res, next) => {
|
|||
});
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
res.json({
|
||||
message: "User Doesn't Exists",
|
||||
type: "error",
|
||||
});
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (user) {
|
||||
if (user.isVerified) {
|
||||
|
|
Loading…
Reference in New Issue