Add missing auth check to saveSetupHandler

Consistent with all other mutation handlers which already guard with
ValidateJWTFromCookie.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Harry Culpan 2026-06-30 18:23:27 -04:00
parent 07e67d4684
commit 2d6436dca6

View file

@ -13,6 +13,11 @@ import (
) )
func saveSetupHandler(w http.ResponseWriter, r *http.Request) { func saveSetupHandler(w http.ResponseWriter, r *http.Request) {
if !ValidateJWTFromCookie(r, appKey) {
http.Error(w, "Unauthorized", http.StatusUnauthorized)
return
}
r.ParseForm() r.ParseForm()
nextSession := r.FormValue("nextSession") nextSession := r.FormValue("nextSession")
incDays := r.FormValue("incDays") incDays := r.FormValue("incDays")