Added build ID to footer. Added check for client-server mismatch.
This commit is contained in:
parent
10037add99
commit
0d940749b1
5 changed files with 77 additions and 2 deletions
6
main.go
6
main.go
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue