Merge branch 'adminsock-api' into adminsock-socket

# Conflicts:
#	server/server_admin_socket.go
This commit is contained in:
binwiederhier committed 2026-10-24 19:23:37 +00:00
commit cf4de9358b
3 files changed
+45 -45

No files matched your search

+30 -2
View File
@@ -691,14 +691,42 @@ func (s *Server) handleInternal(w http.ResponseWriter, r *http.Request, v *visit
return s.handleHealth(w, r, v)
} else if r.Method == http.MethodGet && r.URL.Path == apiReadyPath {
return s.handleReady(w, r, v)
} else if r.Method == http.MethodGet && r.URL.Path == apiVersionPath {
return s.ensureAdmin(s.handleVersion)(w, r, v)
} else if r.Method == http.MethodGet && r.URL.Path == apiConfigPath {
return s.handleConfig(w, r, v)
} else if r.Method == http.MethodGet && r.URL.Path == webAppConfigPath {
return s.ensureWebEnabled(s.handleWebConfig)(w, r, v)
} else if r.Method == http.MethodGet && r.URL.Path == webAppManifestPath {
return s.ensureWebPushEnabled(s.handleWebManifest)(w, r, v)
} else if h := s.adminHandler(r, false); h != nil {
return s.ensureAdmin(h)(w, r, v)
} else if r.Method == http.MethodGet && r.URL.Path == apiUsersPath {
return s.ensureAdmin(s.handleUsersGet)(w, r, v)
} else if r.Method == http.MethodPost && r.URL.Path == apiUsersPath {
return s.ensureAdmin(s.handleUsersAdd)(w, r, v)
} else if r.Method == http.MethodPut && r.URL.Path == apiUsersPath {
return s.ensureAdmin(s.handleUsersUpdate)(w, r, v)
} else if r.Method == http.MethodDelete && r.URL.Path == apiUsersPath {
return s.ensureAdmin(s.handleUsersDelete)(w, r, v)
} else if (r.Method == http.MethodPut || r.Method == http.MethodPost) && r.URL.Path == apiUsersAccessPath {
return s.ensureAdmin(s.handleAccessAllow)(w, r, v)
} else if r.Method == http.MethodDelete && r.URL.Path == apiUsersAccessPath {
return s.ensureAdmin(s.handleAccessReset)(w, r, v)
} else if r.Method == http.MethodGet && r.URL.Path == apiUsersTokensPath {
return s.ensureAdmin(s.handleUsersTokensGet)(w, r, v)
} else if r.Method == http.MethodPost && r.URL.Path == apiUsersTokensPath {
return s.ensureAdmin(s.handleUsersTokensAdd)(w, r, v)
} else if r.Method == http.MethodDelete && r.URL.Path == apiUsersTokensPath {
return s.ensureAdmin(s.handleUsersTokensDelete)(w, r, v)
} else if r.Method == http.MethodPost && r.URL.Path == apiUsersPasswordResetPath {
return s.ensureAdmin(s.handleUsersPasswordReset)(w, r, v)
} else if r.Method == http.MethodGet && r.URL.Path == apiAdminTiersPath {
return s.ensureAdmin(s.handleAdminTiersGet)(w, r, v)
} else if r.Method == http.MethodPost && r.URL.Path == apiAdminTiersPath {
return s.ensureAdmin(s.handleAdminTiersAdd)(w, r, v)
} else if r.Method == http.MethodPut && r.URL.Path == apiAdminTiersPath {
return s.ensureAdmin(s.handleAdminTiersUpdate)(w, r, v)
} else if r.Method == http.MethodDelete && r.URL.Path == apiAdminTiersPath {
return s.ensureAdmin(s.handleAdminTiersDelete)(w, r, v)
} else if r.Method == http.MethodPost && r.URL.Path == apiAccountPath {
return s.ensureUserManager(s.handleAccountCreate)(w, r, v)
} else if r.Method == http.MethodGet && r.URL.Path == apiAccountPath {