add logout route

This commit is contained in:
juancwu 2026-01-14 02:10:01 +00:00
commit 07ebc06b32
2 changed files with 6 additions and 0 deletions

View file

@ -30,6 +30,11 @@ func (h *authHandler) PasswordPage(w http.ResponseWriter, r *http.Request) {
ui.Render(w, r, pages.AuthPassword(""))
}
func (h *authHandler) Logout(w http.ResponseWriter, r *http.Request) {
h.authService.ClearJWTCookie(w)
http.Redirect(w, r, "/", http.StatusSeeOther)
}
func (h *authHandler) SendMagicLink(w http.ResponseWriter, r *http.Request) {
email := strings.TrimSpace(r.FormValue("email"))