Backend Routes - maggieyao1211/Open-Omakase GitHub Wiki

HTML

  • GET / StaticPagesController#root

users

  • GET /api/users - returns the user information and its reviews for each restaurant
  • POST /api/users - sign up

session

  • POST /api/session - log in
  • DELETE /api/session - log out

restaurants

  • GET /api/restaurants - returns relevant restaurants (filtered by data/params)
  • GET /api/restaurants/:id - returns restaurant

reviews

  • GET /api/restaurants/:restaurant_id/reviews - returns reviews for this restaurant
  • POST /api/reviews - creates a review for a restaurant

reservations

  • GET /api/users/:user_id/reservations - returns reservations for current user
  • POST /api/reservations - creates a reservation for current user on a restaurant
  • DELETE /api

citys

  • GET /api/citys/:city_id - returns all restaurants for this city