-
Notifications
You must be signed in to change notification settings - Fork 0
Backend Routes
dch21 edited this page Nov 7, 2020
·
6 revisions
GET / StaticPagesController#root
POST /api/users - sign up
GET /api/users/:id - get logged in user showpage with reservation history, likes, and reviews
PATCH /api/users/:id - edit user details
DELETE /api/users/:id - delete account
POST /api/session - log in
DELETE /api/session - log out
GET /api/restaurants- gets an index of all the restaurants (can be filtered by data or params)
GET /api/restaurants/:id- show page for a particular restaurant
GET /api/users/:id/reservations - returns all reservations for user as indicated by wildcard
POST /api/restaurants/:id/reservations - creates a reservation
PATCH /api/reservations/:id - edit a reservation
DELETE /api/reservations/:id - remove a reservation
GET /api/restaurants/:id/reviews - returns all reviews for restaurant indicated by wildcard
POST /api/restaurants/:id/reviews - creates a review
PATCH /api/reviews/:id - edit a review
DELETE /api/reviews/:id - remove a review
GET /api/users/:id/favorites - returns all favorite restaurants for that particular user
POST /api/favorites - creates a favorite
DELETE /api/favorites/:id - remove a favorite (PATCH not needed since you can't edit something that is designated as favorite. It's either a favorite or not.)