feat: complete dashboard API migration
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled

Implemented missing system, analytics, and auth endpoints. Verified parity with frontend expectations.
This commit is contained in:
2026-03-19 11:14:28 -04:00
parent 2245cca67a
commit 1d032c6732
2 changed files with 210 additions and 13 deletions

View File

@@ -97,6 +97,7 @@ func (s *Server) setupRoutes() {
api.POST("/auth/login", s.handleLogin)
api.GET("/auth/status", s.handleAuthStatus)
api.POST("/auth/logout", s.handleLogout)
api.POST("/auth/change-password", s.handleChangePassword)
// Protected dashboard routes (need admin session)
admin := api.Group("/")
@@ -104,6 +105,7 @@ func (s *Server) setupRoutes() {
{
admin.GET("/usage/summary", s.handleUsageSummary)
admin.GET("/usage/time-series", s.handleTimeSeries)
admin.GET("/usage/providers", s.handleProvidersUsage)
admin.GET("/analytics/breakdown", s.handleAnalyticsBreakdown)
admin.GET("/clients", s.handleGetClients)
@@ -124,6 +126,9 @@ func (s *Server) setupRoutes() {
admin.DELETE("/users/:id", s.handleDeleteUser)
admin.GET("/system/health", s.handleSystemHealth)
admin.GET("/system/settings", s.handleGetSettings)
admin.POST("/system/backup", s.handleCreateBackup)
admin.GET("/system/logs", s.handleGetLogs)
}
}