fix: update API endpoint for tech stack information
This commit is contained in:
1 parent
bef338556f
commit
4a37006069
2 files changed
+3
-4
No files matched your search
+2
-3
@@ -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)"},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user