fix: save PGN + moves on game end — use service key for DB update
- game.js now sends moves array + move_count alongside PGN
- API uses SUPABASE_SERVICE_KEY instead of user token for PATCH
(user token may lack permission to update matches table)
- Handles moves as array or string
- This fixes analysis page showing "no moves" after game ends
Co-Authored-By:
Claude Opus 4.6 <noreply@anthropic.com>
Showing
Please register or sign in to comment