Backend Routes - mmdurnin/TableFor2 GitHub Wiki

HTML

  • GET / StaticPagesController#root

API Endpoints

Users

  • POST /api/users - sign up
  • GET /api/users/:user_id - user show page (profile page)

Session

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

Restaurants

  • GET /api/restaurants - restaurants index
  • GET /api/restaurants/:restaurant_id - restaurant show page

Reservations

  • POST /api/reservations - create new reservation, session: user_id, form body: restaurant_id
  • GET /api/reservations - get reservations, session: user_id
  • GET /api/reservations/:reservation_id - get specific reservation, session: user_id
  • PATCH /api/reservations/:reservation_id - update reservation, form body: user_id, restaurant_id
  • DELETE /api/reservations/:reservation_id - cancel reservation, form body: user_id, restaurant_id

Reviews

  • GET /api/restaurants/:restaurant_id/reviews - reviews index
  • POST /api/restaurants/:restaurant_id/reviews - create review on restaurant show page

Cuisine Types

  • GET /api/cuisine_types