Added build ID to footer. Added check for client-server mismatch.

This commit is contained in:
Pen Anderson 2026-03-03 13:38:31 -06:00
parent 10037add99
commit 0d940749b1
5 changed files with 77 additions and 2 deletions

View file

@ -12,6 +12,8 @@ import (
"os"
)
var buildID = "dev"
//go:embed frontend/dist
var frontendFS embed.FS
@ -145,6 +147,10 @@ func (app *App) registerRoutes(mux *http.ServeMux) {
mux.HandleFunc("GET /api/sync/pull", auth(app.handleSyncPull))
mux.HandleFunc("GET /api/sync/stream", auth(app.handleSyncStream))
mux.HandleFunc("GET /api/version", func(w http.ResponseWriter, r *http.Request) {
writeJSON(w, map[string]string{"build": buildID})
})
// Kiosk — authenticated by volunteer token, no JWT required.
mux.HandleFunc("GET /api/v/{token}", app.handleKioskGet)
mux.HandleFunc("POST /api/v/{token}/shifts/{id}", app.handleKioskClaim)