소스 검색

Update email verification to automatically log in the user after verification.

Lee Morgan 5 년 전
부모
커밋
f3ca913054
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      controllers/emailVerification.js

+ 3 - 2
controllers/emailVerification.js

@@ -94,9 +94,10 @@ module.exports = {
                 return owner.save();
             })
             .then((owner)=>{
-                req.session.success = "EMAIL VERIFIED. PLEASE LOG IN";
+                req.session.owner = owner.session.sessionId;
+                req.session.merchant = owner.merchants[0].toString();
 
-                return res.redirect("/login");
+                return res.redirect("/dashboard");
             })
             .catch((err)=>{
                 if(typeof(err) === "string"){