- Added hidden field 'realLocationName' to store actual location name from Nominatim API
- Updated location saving to use real location name (display_name) instead of search term
- Fallback to search term if real location name not available
- Now saves proper location names like 'Marienplatz, Altstadt-Lehel, München, Bayern, Deutschland' instead of just 'München'
- Improved location data quality in database
- Added show_in_leaderboard to user-player API response
- Improved loadSettings() function with better error handling
- Added console logging for debugging
- Settings modal now shows current user preference instead of always 'off'
- Fixed dependency on currentPlayerId (now uses currentUser.id directly)
- Changed from /api/v1/private/update-player-settings to /api/v1/public/update-player-settings
- Removed API key requirement for logged-in users
- Added both public and private endpoints for flexibility
- Fixed 401 Unauthorized error in settings modal
✨ Features:
- Added show_in_leaderboard column to players table (default: false)
- Replaced Quick Actions with Settings section in dashboard
- Added toggle switch for leaderboard visibility
- Created settings modal with privacy controls
🔧 API Changes:
- Added /api/v1/private/update-player-settings endpoint
- Updated best-times queries to filter by show_in_leaderboard
- Updated times-with-details to respect privacy settings
- Added updated_at column to players table
🎨 UI/UX:
- Modern toggle switch design
- Responsive settings modal
- Success/error notifications
- Clear privacy explanation
🔐 Privacy:
- Default: Times are NOT shown in global leaderboard
- Users can opt-in via settings
- Personal dashboard always shows own times
- Global leaderboard only shows opted-in users
- Simplified CORS configuration to allow all origins (*)
- Removed origin restrictions for easier development
- Fixed CORS preflight request handling
- Now allows requests from any domain including 192.168.1.96
- Created detailed API.md with all endpoints
- Documented Public, Private, Web, Admin and Achievements APIs
- Added request/response examples for all routes
- Included data models and error handling
- Added authentication methods and status codes
- Comprehensive documentation for 55+ API endpoints