feat: add /api/settings/get, /api/settings/set to modify config in frontend

This commit is contained in:
2026-09-08 22:13:30 +08:00
parent 15f1ee38db
commit 4eb9abff49
4 changed files with 250 additions and 0 deletions
+4
View File
@@ -23,6 +23,10 @@ func SetupRouter() *http.ServeMux {
mux.HandleFunc("/api/server/getStatus", handler.ServerGetStatusHandler)
mux.HandleFunc("/api/server/exec", handler.ServerExecHandler)
// Settings endpoints (admin only).
mux.HandleFunc("/api/settings/get", handler.SettingsGetHandler)
mux.HandleFunc("/api/settings/set", handler.SettingsSetHandler)
// Health check endpoint.
mux.HandleFunc("/health", handler.HealthHandler)