From 4a37006069c764cb9b28b40452d5be22e0f1c245 Mon Sep 17 00:00:00 2001 From: Gabriel20xx Date: Sat, 22 Aug 2026 17:33:59 +0200 Subject: [PATCH] fix: update API endpoint for tech stack information --- backend/server.go | 5 ++--- frontend/src/lib/api.js | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/backend/server.go b/backend/server.go index 4f6cff3..8456c58 100644 --- a/backend/server.go +++ b/backend/server.go @@ -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)"}, }, diff --git a/frontend/src/lib/api.js b/frontend/src/lib/api.js index 084b802..54711a8 100644 --- a/frontend/src/lib/api.js +++ b/frontend/src/lib/api.js @@ -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() {