Skip to content
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

Code Improvements Needed for QuizQuest Backend Models #21

Closed
chikatlarakesh opened this issue Oct 4, 2024 · 1 comment · Fixed by #24
Closed

Code Improvements Needed for QuizQuest Backend Models #21

chikatlarakesh opened this issue Oct 4, 2024 · 1 comment · Fixed by #24
Assignees
Labels

Comments

@chikatlarakesh
Copy link

GSSoC Contributor

Description

I would like to propose several improvements to the backend models defined in the QuizQuest project, specifically in the src/models directory.

Current Issues:

  1. Typographical Error: The codeSchmea variable name contains a typo and should be corrected to codeSchema for consistency.
  2. Data Type for liveUntil: The liveUntil field is currently defined as a String, which should be changed to a Date type for proper date handling.
  3. Reference Type for createdBy: The createdBy field is currently an array of ObjectId. If the intention is to allow only one user to create a quiz, this should be changed to a single ObjectId.
  4. Unused Import: The import statement for mongo is unnecessary and should be removed to clean up the code.
  5. Export Consistency: Ensure that the exported model names consistently match the schema names for clarity.

Proposed Changes:

  • Correct the typo in the code schema name.
  • Change the data type of liveUntil from String to Date.
  • Modify createdBy to a single ObjectId unless multiple creators are required.
  • Remove the unused import of mongo.
  • Ensure that the exported model names align with the schema names.

Implementing these changes will enhance the maintainability and integrity of the backend code for the QuizQuest application. Thank you for considering this issue!

@chikatlarakesh
Copy link
Author

I have submitted a pull request for this issue, please check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants