Skip to content

Backend Routes

Jose edited this page Feb 3, 2021 · 4 revisions

Routes for back end actions:

  • Get all trips for a specific user:

GET >> "/api/trips/user/:user_id"

  • Get a specific trip:

GET >> "/api/trips/:id"

  • Create a new trip:

POST >> "/api/trips/"

  • Update trip:

PATCH >> "/api/trips/:id"

  • Delete a specific trip:

DELETE >> "/api/trips/:id"

  • Add / Delete comments, and itineraryItems

POST >> "/api/trips/:trip_id/comment" DELETE >> "/api/trips/comments/:id"

POST >> "/api/trips/:trip_id/itineraryItem" DELETE >> "/api/trips/itineraryItems/:id"

  • Add / Delete users from trips

POST >> "/api/trips/:trip_id/user" Include the email in the request body.

DELETE >> "/api/trips/:trip_id/user/:user_id"

Clone this wiki locally