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

Make Backend Routes for Catalog #20

Closed
ThatMegamind opened this issue Nov 22, 2023 · 0 comments · Fixed by #27
Closed

Make Backend Routes for Catalog #20

ThatMegamind opened this issue Nov 22, 2023 · 0 comments · Fixed by #27
Assignees
Labels

Comments

@ThatMegamind
Copy link
Collaborator

ThatMegamind commented Nov 22, 2023

Instructions

  • Create CRUD routes for each query associated with Catalog, which will allow us to access the data from the frontend

Notes

  • Use the queries under server/queries/catalog.sql as a jumping-off point!

Acceptance Criteria

Routes should be created for the following:

  • GET - Returns all data from the catalog table
  • GET/:id - Returns the row that matches the id
  • POST - Adds a new row to the catalog table
  • PUT/:id - Updates an existing row given an id
    • Note: all fields in the req.body are optional (i.e. not all attributes in the table need to be specified)
  • DELETE/:id - deletes an existing row given an id

Logistics:

  • Add the routes in a file located in routes/catalog.js
  • app.js should be updated accordingly
  • Delete server/queries/catalog.sql once this task is complete

Resources

As always, feel free to message Michael and Michelle if you have any questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants