chore(auth): #331 implement and fix sign up tests
All checks were successful
Build Docker Image / Build-Docker-Image (push) Successful in 48s

This commit is contained in:
2024-12-23 22:51:46 +01:00
parent 7a7d7cf204
commit 4c869b8f08
3 changed files with 176 additions and 3 deletions

View File

@@ -203,11 +203,14 @@ func (handler AuthImpl) handleSignUp() http.HandlerFunc {
} else if errors.Is(err, service.ErrInvalidEmail) {
utils.TriggerToast(w, r, "error", "The email provided is invalid", http.StatusBadRequest)
return
} else if errors.Is(err, service.ErrInvalidPassword) {
utils.TriggerToast(w, r, "error", service.ErrInvalidPassword.Error(), http.StatusBadRequest)
return
}
// If the "service.ErrAccountExists", then just continue
// If err is "service.ErrAccountExists", then just continue
}
utils.TriggerToast(w, r, "success", "A link to activate your account has been emailed to the address provided.", http.StatusOK)
utils.TriggerToast(w, r, "success", "An activation link has been send to your email", http.StatusOK)
}
}