Enhance session management and player data handling

- Updated `requireSession.js` to ensure `req.body` and `req.query` are always objects before access, improving robustness against malformed requests.
- Changed API endpoint for login from `/api/sessions/login` to `/api/players/login` in `App.js`, updating related logging and state management to reflect the new structure.
- Enhanced player fetching logic in `PlayerTab.jsx` to handle cases where GM is logged in, ensuring all players are fetched from the API. Added debug logging for better traceability.
- Implemented fallback to stored player data if API fetch fails, ensuring a smoother user experience for regular players.
- Updated local storage handling to accommodate changes in player data structure.
This commit is contained in:
2025-08-16 00:06:50 +02:00
parent 73e44ffcdb
commit ec487b0614
7 changed files with 787 additions and 15 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.