From 051bf7e8518f8b0b05851d52b77d322d10bf6b91 Mon Sep 17 00:00:00 2001 From: Ethan Richards <42894274+ezrichards@users.noreply.github.com> Date: Sat, 2 Mar 2024 21:50:50 -0700 Subject: [PATCH] admin/volunteer login: redirect to existing page --- internal/admin.go | 4 +++- internal/volunteer.go | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/admin.go b/internal/admin.go index 44c7497..85bec9c 100644 --- a/internal/admin.go +++ b/internal/admin.go @@ -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")) } } diff --git a/internal/volunteer.go b/internal/volunteer.go index e4a2c48..345af1b 100644 --- a/internal/volunteer.go +++ b/internal/volunteer.go @@ -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}) } }