Add missing return after redirect in /login handler

Without the return, execution fell through to render the login page
into the same response after writing the redirect header.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Harry Culpan 2026-06-30 18:38:19 -04:00
parent dcf1230414
commit d48adbc3f5

View file

@ -39,6 +39,7 @@ func routes(r *chi.Mux) {
r.Get("/login", func(w http.ResponseWriter, r *http.Request) { r.Get("/login", func(w http.ResponseWriter, r *http.Request) {
if ValidateJWTFromCookie(r, appKey) { if ValidateJWTFromCookie(r, appKey) {
http.Redirect(w, r, "/setup", http.StatusSeeOther) http.Redirect(w, r, "/setup", http.StatusSeeOther)
return
} }
comp := templates.Login() comp := templates.Login()
comp.Render(context.Background(), w) comp.Render(context.Background(), w)