Files
latticelm/internal/admin/routes.go
Anibal Angulo 7025ec746c
Some checks failed
CI / Test (pull_request) Failing after 1m33s
CI / Lint (pull_request) Failing after 13s
CI / Build (pull_request) Has been skipped
CI / Security Scan (pull_request) Failing after 4m47s
CI / Build and Push Docker Image (pull_request) Has been skipped
Add admin UI
2026-03-05 23:09:27 +00:00

18 lines
530 B
Go

package admin
import (
"net/http"
)
// RegisterRoutes wires the admin HTTP handlers onto the provided mux.
func (s *AdminServer) RegisterRoutes(mux *http.ServeMux) {
// API endpoints
mux.HandleFunc("/admin/api/v1/system/info", s.handleSystemInfo)
mux.HandleFunc("/admin/api/v1/system/health", s.handleSystemHealth)
mux.HandleFunc("/admin/api/v1/config", s.handleConfig)
mux.HandleFunc("/admin/api/v1/providers", s.handleProviders)
// Serve frontend SPA
mux.Handle("/admin/", http.StripPrefix("/admin", s.serveSPA()))
}