Friday, April 10, 2026

Fix Referee Sign-Off - Add Missing Server Endpoint

Fix Referee Sign-Off - Add Missing Server Endpoint

Canadian Elite Volleyball Academy — Development Update • April 10, 2026

Fix Referee Sign-Off - Add Missing Server Endpoint

What & Why

When a referee finishes all their games and clicks "Sign Off" in the referee console, the frontend calls . This endpoint does not exist in server/routes, resulting in a 404 error. The sign-off button silently fails — the referee sees no feedback and their token remains active (though it auto-expires at midnight). This is a broken user flow for every referee at the end of their session.

Done looks like

  • Clicking "Sign Off" in the referee console successfully deactivates the token
  • The referee sees a success toast: "Signed off - Your referee session has ended"
  • The token is marked in the database
  • Only the referee holding the valid token can deactivate it (no auth bypass)
  • The mutation has proper error handling (onError toast)

Relevant files

  • — add new endpoint near existing referee-access endpoints (~line 4587)
  • — deactivateTokenMutation (line 305), handleSignOff (line 407)
  • — existing method (used by other token endpoints)

Technical notes

  • Existing similar endpoint: (line 4853) uses numeric DB id and requires coordinator auth
  • The new endpoint should use the hex token string (not DB id) since referees only know their token
  • The helper in referee-console already appends the token as a query param, so the URL will be
  • Storage method: — check if this method exists or if direct DB update is needed
  • No authentication middleware needed — the token itself IS the authentication (same pattern as )

Canadian Elite Volleyball Academy
elitevolleyball.training

No comments:

Post a Comment