-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
chore(refactor): refactored user schema to camelcasing #54
chore(refactor): refactored user schema to camelcasing #54
Conversation
WalkthroughThe recent updates across various JavaScript and schema files in a Node.js application primarily involve standardizing the naming convention to camelCase for consistency and better readability. This includes changes to property names in route handlers and Mongoose schemas, aligning with common JavaScript practices. Changes
Assessment against linked issues
Poem
TipsChat with CodeRabbit Bot (
|
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.
Hello @prasanth7890, thank you for raising a pull request.
Currently, the pull request is marked as https://github.com/MilanCommunity/Milan-Backend/labels/%F0%9F%9F%A3%20status%3A%20todo so please wait until the maintainers/owner review it and provide you with feedback/suggestions to proceed further.
Feel free to reach out to Tamal on Twitter, or drop a mail at [email protected] if you think that this pull request is of critical priority.
Give us a ⭐ to show some support
Happy OpenSource 🚀
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (6)
- routes/club/Club.js (1 hunks)
- routes/display/Display.js (1 hunks)
- routes/user/Auth.js (3 hunks)
- routes/user/User.js (3 hunks)
- schema/user/ReportProblemSchema.js (1 hunks)
- schema/user/UserSchema.js (1 hunks)
Files skipped from review due to trivial changes (2)
- routes/display/Display.js
- routes/user/User.js
Additional comments: 7
routes/club/Club.js (1)
- 12-14: The change from
usertype: "club"
touserType: "club"
aligns with the refactor to camelCase naming convention as described in the pull request summary.routes/user/Auth.js (3)
75-75: The cookie key has been correctly updated from
usertype
touserType
to reflect the new camelCase naming convention.120-124: The properties
firstName
,lastName
, andpassword
have been correctly updated to camelCase in theUserData
object, withpassword
being renamed tonewHashedPassword
for clarity.173-173: The property
userType
has been correctly updated to camelCase when creating a new user in the/google/callback
route.schema/user/ReportProblemSchema.js (1)
- 3-20: The changes to the
ReportProblemSchema
correctly update the field names to camelCase, which aligns with the JavaScript best practices for naming conventions.schema/user/UserSchema.js (2)
3-14: The changes to the
UserSchema
fields from snake_case or lowercase to camelCase are consistent with the pull request description and improve the readability and consistency of the codebase.1-14: Ensure that all database-related configurations, such as indexes and validation rules, are updated to reflect the new field names in the
UserSchema
.
closes #44
👷🏻 Changes made
I rewrote the UserSchema and ReportProblemSchema to follow camelCase naming conventions for improved readability and consistency. Also updated instances in code where these schema models are referenced to reflect the case changes.
Summary by CodeRabbit
Refactor
userType
,firstName
,lastName
,reportMessage
).Bug Fixes
Documentation