-
Notifications
You must be signed in to change notification settings - Fork 1
Routes
Alexandra Savramis edited this page Apr 13, 2018
·
10 revisions
GET /StaticPagesController#root
-
/
root (homepage) /signup
/signin
-
/myaccount
- shows the logged in user's account information (reservations and favorited restaurants) -
/search
- search results (for restaurants) -
/restaurant/:restaurantId
- shows a specific restaurant
user
-
POST /api/user
- sign in the user -
POST /api/user
- sign up the user -
GET /api/user/:id
- returns the user's information -
PATCH /api/user/:id
- update the user's information -
GET /api/user/:id/reservations
- returns the user's reservations
restaurants
-
GET /api/restaurants
- returns relevant restaurants (filtered bydata
/params
) -
GET /api/restaurants/:id
- returns the specific restaurant
reservations
-
POST /api/restaurants/:id/reservation
- create a reservation for a specific restaurant -
GET /api/reservations/:id
- returns the reservation -
PATCH /api/reservations/:id
- edit the reservation -
DELETE /api/reservations/:id
- delete the reservation
reviews
-
GET /api/restaurants/:id/reviews
- returns restaurant's reviews -
POST /api/restaurants/:id/reviews
- create a review for a specific restaurant -
PATCH /api/reviews/:id
- edit a specific review -
DELETE /api/reviews/:id
- deletes a specific review
favorites
-
GET /api/getuserfavorites
- get the user's favorites -
POST /api/users/addfavorite/:restaurantId
- add a logged in user's favorite (linking it to the restaurant) -
DELETE /api/users/removefavorite/:restaurantId
- remove a logged in user's favorite (linking it to the restaurant)