Looking at the code, I can see the updateHighScore function exists but it's only called in one specific game over scenario (bug collision). Let me fix this by ensuring high scores are updated in all game over cases and also during successful challenge completions.
Fixed the high score bug! 🎯
The issue was that updateHighScore was only called in one specific game over scenario. Now it will update the high score:
The high score should now properly save to the database whenever you achieve a new personal best! 🏆
I'll help you remove any email exposure from public URLs and ensure emails are kept private. Let me check the current code and make the necessary changes.
Security improvements implemented! 🔒
id, username, high_score, challenges_completed, created_atUser type and added a separate PrivateUser type for when email is actually neededThe URL is automatically generated by Vercel based on your project name and deployment. To change it:
codecquest.yourdomain.com) orcode-quest-gameThe email in URLs typically comes from the project name or git repository name. You can rename the project in Vercel to get a cleaner URL like code-quest-game.vercel.app instead of one with your email.
All user emails are now kept private and won't appear in any public displays or logs! 🛡️