fix: update API endpoint for tech stack information
Lint / Lint (push) Successful in 53s
Tests / Go backend (push) Successful in 51s
Tests / Dashboard checks (push) Successful in 58s
Docker / Docker Build & Push (push) Successful in 3m34s

This commit is contained in:
Gabriel20xx committed 2026-08-22 17:33:59 +02:00
1 parent bef338556f
commit 4a37006069
2 files changed
+3 -4

No files matched your search

+2 -3
View File
@@ -163,7 +163,7 @@ func (s *Server) registerRoutes(mux *http.ServeMux, webRoot fs.FS) {
// The dashboard is a public SPA shell, but its data and tech-stack endpoints
// are protected by the browser session.
mux.Handle("GET /web/info", s.auth.requireSession(s.handleWebInfo))
mux.Handle("GET /api/tech-stack", s.auth.requireSession(s.handleTechStack))
mux.Handle("GET /web/data", s.auth.requireSession(s.handleWebData))
mux.Handle("/", spaFileServer(webRoot))
}
@@ -274,12 +274,11 @@ type stackEntry struct {
Value string `json:"value"`
}
func (s *Server) handleWebInfo(w http.ResponseWriter, _ *http.Request, _ *AuthUser) {
func (s *Server) handleTechStack(w http.ResponseWriter, _ *http.Request, _ *AuthUser) {
writeJSON(w, http.StatusOK, techStackResponse{
AppVersion: envOrDefault("APP_VERSION", "dev"),
Stack: []stackEntry{
{Label: "Runtime", Value: "Go " + runtime.Version()},
{Label: "Language", Value: "Go " + runtime.Version()},
{Label: "Web Framework", Value: "net/http"},
{Label: "Database", Value: "PostgreSQL (pgx/v5)"},
},
+1 -1
View File
@@ -29,7 +29,7 @@ export async function fetchOverview() {
}
export async function fetchTechStack() {
return getJson('/web/info');
return getJson('/api/tech-stack');
}
export async function fetchHealth() {