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 Published Schedule #19

Closed
ThatMegamind opened this issue Nov 22, 2023 · 2 comments · Fixed by #29
Closed

Make Backend Routes for Published Schedule #19

ThatMegamind opened this issue Nov 22, 2023 · 2 comments · Fixed by #29
Assignees
Labels

Comments

@ThatMegamind
Copy link
Collaborator

ThatMegamind commented Nov 22, 2023

Instructions

  • Modify the primary GET query to also retrieve the title and host for each event in the Published Schedule by using LEFT JOIN
  • Create CRUD routes for each query associated with Published Schedule, which will allow us to access the data from the frontend

Notes

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

Acceptance Criteria

Routes should be created for the following:

  • GET - Returns all data from the published_schedule table
  • GET/:id - returns the rows that match the given id
  • POST - Adds a new row to the published_schedule table
  • PUT/:id - Updates an existing row given an id
  • DELETE/:id - deletes an existing row given an id

Logistics:

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

Resources

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

@seancfong
Copy link
Member

Modify the primary GET query to also retrieve the title and host for each event in the Published Schedule by using LEFT JOIN

Should the GET/:id route remain unchanged?

@ThatMegamind
Copy link
Collaborator Author

ThatMegamind commented Nov 28, 2023

Modify the primary GET query to also retrieve the title and host for each event in the Published Schedule by using LEFT JOIN

Should the GET/:id route remain unchanged?

Thanks for catching that! Both should be updated in the same way

@seancfong seancfong linked a pull request Dec 7, 2023 that will close this issue
3 tasks
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