Skip to content

Commit

Permalink
admin/volunteer login: redirect to existing page
Browse files Browse the repository at this point in the history
  • Loading branch information
ezrichards committed Mar 3, 2024
1 parent e7a87b4 commit 051bf7e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion internal/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ func (a *Application) HandleAdminLogin(w http.ResponseWriter, r *http.Request) {
} else {
log.Info().Msg("sent email")
http.SetCookie(w, &http.Cookie{Name: "admin_email", Value: emailAddress, Path: "/"})
w.Write([]byte("check your email for a login link"))
a.ConfirmEmailRenderer(w, r, map[string]any{"Email": emailAddress})

// w.Write([]byte("check your email for a login link"))
}
}

Expand Down
2 changes: 1 addition & 1 deletion internal/volunteer.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (a *Application) HandleVolunteerLogin(w http.ResponseWriter, r *http.Reques
} else {
log.Info().Msg("sent email")
http.SetCookie(w, &http.Cookie{Name: "volunteer_email", Value: emailAddress, Path: "/"})
w.Write([]byte("check your email for a login link"))
a.ConfirmEmailRenderer(w, r, map[string]any{"Email": emailAddress})
}
}

Expand Down

0 comments on commit 051bf7e

Please sign in to comment.