mirror of
https://github.com/tiennm99/vngeoguessr.git
synced 2026-10-14 08:18:44 +00:00
A timeout or 5xx from Mapillary no longer moves the day to another panorama; only a missing image does, and the pick is written with SET NX so instances that draw differently still serve one. /api/daily maps a dry pool to 404 and an upstream failure to 502. /api/new-game always mints a fresh session id instead of reusing the client's, which let a new round be overwritten mid-guess; /api/guess rejects ids the server could not have minted. The route reuses the history it already read, runs round statistics alongside the board writes, and drops an unreachable error branch. One cookie parser serves the player id and the debug key; the leaderboard fan-out takes points, not a function, and no longer rewraps errors. Tests share one Mapillary stub, the leaderboard stub contract compares a real scored row, and scanKeys and SET NX are covered.