feat: complete dashboard API migration
Implemented missing system, analytics, and auth endpoints. Verified parity with frontend expectations.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user