admin: add delete user with confirmation dialog

This commit is contained in:
2026-04-22 21:27:37 +02:00
parent ee05ad7511
commit b1bb205d55
4 changed files with 57 additions and 0 deletions

View File

@@ -111,6 +111,8 @@ func NewRouter(cfg Config) http.Handler {
mux.Handle("/admin/users/", middleware.RequireAdmin(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
path := r.URL.Path
switch {
case strings.HasSuffix(path, "/delete"):
adminHandler.HandleDeleteUser(w, r)
case strings.HasSuffix(path, "/watchlist"):
adminHandler.HandleUserWatchlist(w, r)
case strings.HasSuffix(path, "/continue-watching"):