feat: integration page #41

This commit is contained in:
Florian Sylvain
2024-06-14 15:23:51 +02:00
parent e4c2230b64
commit 0759ab6d70
7 changed files with 95 additions and 0 deletions
+3
View File
@@ -30,6 +30,9 @@ var EmptyRegisterPage = &RegisterPage{
func GetRegisterPageHandler(registerPage *RegisterPage) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
if !IsLoggedIn(r) && SomeUsersVerified() {
http.Redirect(w, r, "/login?failure=There is already a verified account, please login.", http.StatusSeeOther)
}
if (IsLoggedIn(r) && IsVerified(r)) || SomeUsersVerified() {
http.Redirect(w, r, "/home", http.StatusSeeOther)
return