-
Notifications
You must be signed in to change notification settings - Fork 11
Feat: refactor with sorting fix #131
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
Feat: refactor with sorting fix #131
Conversation
Spectator role addition and performance enhancements
Fix: created at index
Perf: added lean to a few queries
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Co-authored-by: Copilot <[email protected]>
Feat: added database level auditing
|
Changes look good @icy-r . I updated the path of the bulk update endpoint and also added creator lock into it. Merging now and testing in staging before release |
| await sendUserPassword(payload.email, generatedPassword, payload.role); | ||
| return newUser; | ||
| } catch (e) { | ||
| findOneAndRemoveUser({ email: payload.email }).exec(); |
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.
@icy-r this will not run without the exec call. This returns a query instance which we must either await or use exec on to actually execute the query
This pull request introduces a new bulk update feature for question status, refines validation and error handling, and makes minor improvements to existing logic. The most significant change is the addition of an endpoint and service logic to enable or disable all questions at once. Other updates include improved validation for settings and user verification, and minor code quality enhancements.
Bulk question status update:
bulkUpdateStatuscontroller and corresponding service (bulkUpdateQuestionStatus) to enable/disable all questions at once (src/controllers/question.js,src/services/question.js,src/repository/question/index.js,src/routes/question.routes.js,src/validations/question.js). [1] [2] [3] [4] [5] [6] [7] [8]PATCH /questions/bulk/statusfor admins, with schema validation (bulkUpdateStatusSchema) for theenabledfield (src/routes/question.routes.js,src/validations/question.js). [1] [2]Validation and error handling improvements:
resendVerificationcontroller to throw a 404 error if the user is not found (src/controllers/auth.js).src/routes/setting.routes.js,src/controllers/settings.js). [1] [2]Minor code quality and bug fixes:
src/services/leaderboard.js).pickimport fromlodashinsrc/app.js..exec()call (src/services/user.js).upsertoption in submission grading update (src/repository/submission.js).