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

Backend schema #7

Merged
merged 8 commits into from
Feb 4, 2024
Merged

Backend schema #7

merged 8 commits into from
Feb 4, 2024

Conversation

r800360
Copy link
Member

@r800360 r800360 commented Jan 27, 2024

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.

r800360 and others added 3 commits January 25, 2024 18:55
…chemas as well as integration with models, routes, controllers, and validators; general POST and GET requests working as reflected in MongoDB Compass
@r800360 r800360 linked an issue Jan 27, 2024 that may be closed by this pull request
@Anthonyp0329 Anthonyp0329 requested review from a team and eshaan-s18 and removed request for a team January 27, 2024 21:16
@Anthonyp0329 Anthonyp0329 requested review from a team, PiXlRAM, pratyush1718 and meganleongg and removed request for eshaan-s18, a team, PiXlRAM and pratyush1718 January 27, 2024 21:25
Copy link
Collaborator

@Anthonyp0329 Anthonyp0329 left a 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.

backend/models/issueModel.js Outdated Show resolved Hide resolved
backend/models/issueModel.js Outdated Show resolved Hide resolved
backend/controllers/issueController.js Outdated Show resolved Hide resolved
…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
Copy link
Contributor

@pratyush1718 pratyush1718 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@EdwardLinS EdwardLinS merged commit 07a312d into main Feb 4, 2024
2 checks passed
@EdwardLinS EdwardLinS deleted the backendSchema branch February 4, 2024 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backend Setup
5 participants