chore(auth): #331 add sign up verify tests
Some checks failed
Build Docker Image / Build-Docker-Image (push) Failing after 46s
Some checks failed
Build Docker Image / Build-Docker-Image (push) Failing after 46s
This commit is contained in:
@@ -171,11 +171,17 @@ func (handler AuthImpl) handleSignUpVerifyResponsePage() http.HandlerFunc {
|
||||
|
||||
err := handler.service.VerifyUserEmail(token)
|
||||
|
||||
if err != nil {
|
||||
utils.DoRedirect(w, r, "/auth/signin")
|
||||
isVerified := err == nil
|
||||
comp := auth.VerifyResponseComp(isVerified)
|
||||
|
||||
var status int
|
||||
if isVerified {
|
||||
status = http.StatusOK
|
||||
} else {
|
||||
utils.DoRedirect(w, r, "/")
|
||||
status = http.StatusBadRequest
|
||||
}
|
||||
|
||||
handler.render.RenderLayoutWithStatus(r, w, comp, nil, status)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user