ngoworldcommunity / NGOWorld-Backend

This is the official repository for Milan's server side codes.
https://api.milanhub.org
MIT License
7 stars 26 forks source link

chore(refactor): refactored user schema to camelcasing #54

Closed prasanth7890 closed 1 month ago

prasanth7890 commented 1 year ago

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

coderabbitai[bot] commented 1 year ago

Walkthrough

The 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

File Path Change Summary
routes/.../Club.js
routes/.../Display.js
routes/.../Auth.js
routes/.../User.js
Updated query parameter and object properties from usertype to userType, and from firstname and lastname to firstName and lastName.
schema/.../ReportProblemSchema.js
schema/.../UserSchema.js
Renamed fields from usertype, firstname, lastname, and reportmessage to userType, firstName, lastName, and reportMessage.

Assessment against linked issues

Objective Addressed Explanation
Refactor user schema to use camel casing (#44) βœ… The changes in ReportProblemSchema.js and UserSchema.js reflect the camel casing standard as requested.

Poem

In the land of code, where the camelCase reigns,
A rabbit hopped through, making some gains.
Fields and properties, now neatly aligned,
With each keystroke, better code we find. πŸ‡πŸ’»βœ¨


Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - If you reply to a *review comment* from CodeRabbit, the bot will automatically respond. - To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment - Note: Review comments are made on code diffs or files, not on the PR overview. - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Note: For conversation with the bot, please use the review comments on code diffs or files. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - The JSON schema for the configuration file is available [here](https://coderabbit.ai/integrations/coderabbit-overrides.v2.json). - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json`