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);
|
console.log("req.body", req.body);
|
||||||
let user = await User.findOne({ email });
|
let user = await User.findOne({ email });
|
||||||
if (isGoogle) {
|
if (isGoogle) {
|
||||||
|
if (user) {
|
||||||
user.isVerified = true;
|
user.isVerified = true;
|
||||||
user = await user.save();
|
user = await user.save();
|
||||||
const isMatched = await bcrypt.compare(password, user.password);
|
const isMatched = await bcrypt.compare(password, user.password);
|
||||||
|
@ -239,6 +240,13 @@ module.exports.postSignin = async (req, res, next) => {
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
res.json({
|
||||||
|
message: "User Doesn't Exists",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (user) {
|
if (user) {
|
||||||
if (user.isVerified) {
|
if (user.isVerified) {
|
||||||
|
|
Loading…
Reference in New Issue