-
-
Notifications
You must be signed in to change notification settings - Fork 3k
fix(profile): load user without personalBests (@fehmer) #7399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Removed console log statement during user migration.
|
Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request fixes an issue where users without the personalBests field in the database would cause problems when loaded through getUser or getUserByName. The fix introduces a migration function that ensures these users get an initialized personalBests structure.
Changes:
- Added
migrateUserhelper function to initialize missingpersonalBestsfields - Applied migration to
getUserandgetUserByNamefunctions - Added comprehensive test coverage for the migration behavior
- Reorganized imports alphabetically
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| backend/src/dal/user.ts | Added migrateUser function and applied it to user retrieval functions; reorganized imports |
| backend/tests/integration/dal/user.spec.ts | Added tests for missing personalBests scenarios; reorganized imports |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.