Skip to content

Backend Routes

Zalkifl Syed edited this page Jan 22, 2019 · 5 revisions

Backend routes

Root

  • GET / StaticPagesController#root

Users

  • GET /api/users fetch user
  • POST /api/users create new user

Session

  • POST /api/session Sign in
  • DELETE /api/session Sign out

Tabs

  • GET /api/tabs - fetch all Bills
  • GET /api/tabs/:id - fetch Bill
  • POST /api/groups/:group_id/tabs/ - create a Bill

Restaurants

  • GET /api/restaurants - fetches all restaurants user has opened tabs in
  • GET /api/restaurants/:id - fetch data for a single restaurant
  • post /api/tabs/:tab_id/restaurants/new - create a restaurant under a tab_id

Friends

  • GET /api/friends - fetched all friends
  • GET /api/friends/:id - fetches all data on a specific friend

Comments

  • GET /api/comments - fetches all the comments
  • GET /api/tabs/:tab_id/comment/new - make a new comment

Groups

  • GET /api/groups - fetches all groups user is currently in
  • GET /api/groups/:id - fetch all the friends in the group and all the tabs

splits

  • post /api/tabs/:tab_id/split - create new split on tab
  • patch /api/split/:id - edit a split

Clone this wiki locally