Add admin location editing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-22 23:05:17 -04:00
parent 44c20d54ff
commit 3afef25b4c
5 changed files with 47 additions and 0 deletions
+18
View File
@@ -578,6 +578,24 @@ func (s *Server) handleUpdateDescription(w http.ResponseWriter, r *http.Request)
http.Redirect(w, r, fmt.Sprintf("/e/%s/admin/%s", event.Slug, event.AdminToken), http.StatusSeeOther)
}
func (s *Server) handleUpdateLocation(w http.ResponseWriter, r *http.Request) {
event := s.authorizeAdmin(w, r, false)
if event == nil {
return
}
r.Body = http.MaxBytesReader(w, r.Body, 8*1024)
r.ParseForm()
location := sanitize(r.FormValue("location"), maxFieldLen)
s.q.UpdateEventLocation(r.Context(), db.UpdateEventLocationParams{
Location: location,
ID: event.ID,
})
http.Redirect(w, r, fmt.Sprintf("/e/%s/admin/%s", event.Slug, event.AdminToken), http.StatusSeeOther)
}
func (s *Server) handleCreateSlot(w http.ResponseWriter, r *http.Request) {
event := s.authorizeAdmin(w, r, false)
if event == nil {