-
Notifications
You must be signed in to change notification settings - Fork 2
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
Routes and Controllers for the new Additional Information Page #34
Conversation
Pull Request Test Coverage Report for Build 11263827176Details
💛 - Coveralls |
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.
lgtm!
@@ -160,6 +160,7 @@ middleware.privateTagListing = helpers.try(async (req, res, next) => { | |||
next(); | |||
}); | |||
|
|||
|
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.
Nit: we can probably remove this empty line but everything else lgtm!
… src/routes/user.js file
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.
Very well organized code, the comments are helpful.
Issue #24
*This sub-issue spreads across 2 branches: infoButton 4 and infoButton5
What and Why
This sub-issue is for creating the Additonal Information Page. The purpose of the sub issue is to have it lead to a working new endpoint page that has the additonal information page with a form. Here is the PR for the form on the front end repo: CMU-313/nodebb-frontend-f24-team-tbd-1#2
Current Status
It took the second half of sprint 1 and all of sprint 2 to get the new page to work and not show "page not found". The errror that caused this was on src/routes/user.js:
Original:
Fix:
The file was unable to found due to the incorrect location.
Process/Solution
For the routes files I worked on the api file, index file, user file, and admin file
Final look of what was added to src/routes/api file (code was generated by chatgpt)
Final look of what was added to src/routes/user file
For the controller, I have created and worked on the index file and the newly created additional info file :
Final look of what was added to src/controllers/index file:
Final look of src/controllers/additional-info file:
Testing
Alhtough it hasn't worked yet, I wanted to write tests:
src/test/controllers:
src/tes/controllers-admin:
Front-end
All of the front-end logic is in this repo: https://github.com/CMU-313/nodebb-frontend-f24-team-tbd-1.git
The 2nd PR contains the code for the additional information button and the code for the form on the page.
Additional Suggestion
I would go through the code to see if there have been any changes that were unnecessary, especially in the routes to ensure code quality.