-
Notifications
You must be signed in to change notification settings - Fork 6
Add backend routes for courses and classes #1013
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
Add backend routes for courses and classes #1013
Conversation
dd3fabc to
3348b07
Compare
a0febd1 to
2af047a
Compare
lhvy
left a comment
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.
Looks pretty good, minor feedback comments left. Would also suggest looking here and seeing if any of these status codes could be used for when your routes succeed: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status#successful_responses
lhvy
left a comment
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.
Looking good, really happy with the refactor. Just a few minor comments now.
7cbfdcc to
9674588
Compare
… function for update and remove class
a079698 to
9a98db7
Compare
* Add routes for adding and removing course * Update routes by moving validation to controller * Add route for update course colour * add OpenAPI for api-docs for backend using swagger library * Add ApiProperty for user's route * Add get route for courses and classes with update of routing urls * Update PUT request for setCourseColour to PATCH request * Update user routes to using AuthenticatedRequest Type * Add selectClass & removeClass route * Remove OpenAPI and Swagger Library, switched to use Postman * Update route for select and remove class * Remove unwanted routes with forwarding functions * Resolve usage of null and undefined * Resolve PR review comments * Slim down the Course and Class detail for graphql, and add validation function for update and remove class * Update routes returning status code * Refactor user.controller, move all business validation into service level * Remove duplicate getCourse request in addSelectedClass * Resolve issues on the PR code review * Resolve minor issue on function call, optimise prisma call * Resolve function name typo * Update service level function name corresponds to control level
* Add routes for adding and removing course * Update routes by moving validation to controller * Add route for update course colour * add OpenAPI for api-docs for backend using swagger library * Add ApiProperty for user's route * Add get route for courses and classes with update of routing urls * Update PUT request for setCourseColour to PATCH request * Update user routes to using AuthenticatedRequest Type * Add selectClass & removeClass route * Remove OpenAPI and Swagger Library, switched to use Postman * Update route for select and remove class * Remove unwanted routes with forwarding functions * Resolve usage of null and undefined * Resolve PR review comments * Slim down the Course and Class detail for graphql, and add validation function for update and remove class * Update routes returning status code * Refactor user.controller, move all business validation into service level * Remove duplicate getCourse request in addSelectedClass * Resolve issues on the PR code review * Resolve minor issue on function call, optimise prisma call * Resolve function name typo * Update service level function name corresponds to control level
Description 🧾
Testing
By now, we testing our code by reading. Run them later for actual test.
Checklist
feature: for application feature improvement or new featuresbug: fixing something that previously wasn't workingdev: development-side related changesdocker: updates to the Docker codesetup: changes to the setup/infrastructure of the codebasetest: updates to internal testing