Files
SREBOT/web
deploy ac7c318899 fix(player): pick most-recent squadron_members row when uid has duplicates
A player who changed squadrons could end up with two rows in
squadron_members (old + new clan). Without ORDER BY, LIMIT 1
returned whichever row the primary-key B-tree (clan_id, uid) put
first — i.e. the lowest clan_id, which was the stale entry. This
caused the player page to show the old squadron while the homepage
search (which only reads player_games_hist) showed the correct one.

Fix: add ORDER BY updated_at DESC to both the API roster lookup in
server.js and the web fallback lookup in web/server.js, so the most
recently synced membership always wins.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 10:48:44 +00:00
..
2026-06-14 22:58:26 -07:00