-
Notifications
You must be signed in to change notification settings - Fork 0
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
Backend schema #7
Conversation
…chemas as well as integration with models, routes, controllers, and validators; general POST and GET requests working as reflected in MongoDB Compass
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 awesome, great work guys! Some small changes maybe are needed - like making some of the fields optional in the schema, but otherwise looking great.
…ccessary for the purpose of loading complete documents) and created /all route for GETting both medical emergencies and general principles in issueController.js and issueRoutes.js
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!
Tracking Info
Resolves Issue: Backend Setup #2
Changes
We integrated a database model that utilizes two schemas - one for medical emergencies (with title, overview, treatment, and content) and the other for general principles (with title, overview, and content). Keeping this in mind, we incorporated the backend structure adding model, route, controllers, and validators to implement GET, GET by ID, POST, PUT by ID, and DELETE by ID requests.
Testing
We confirmed that our changes worked by configuring Postman to test out the aforementioned requests.
Changes can be viewed in the backend folder code files and once changes are pulled, requests can be performed via Postman.
Sidenote:
DM Anthony if you need the DATABASE_URL field for the backend .env file (looks like "mongodb+srv://:@/?retryWrites=true&w=majority")
If database name is left out, then "test" database is used. You can specify your own database name to create a test database to work from (for me it is RohanTest) or use a preexisting database.