Skip to content

Backend routes

jas-singh-code edited this page Mar 17, 2021 · 5 revisions

HTML


  • GET / StaticPagesController#root

API Endpoints


users

  • POST api/users - create a user

session

  • POST api/session -login
  • DELETE api/session -logout

posts

  • GET /api/posts -returns relevent posts using params
  • POST /api/posts -create a new post
  • PATCH /api/posts/:Id -edits the specified post
  • DELETE /api/posts/:Id -deletes the specified post

likes

  • POST api/likes - like a post or comment
  • DELETE api/likes/:id - delete a like from a post or comment

friend_requests

  • POST api/friend_requests - create a friend request
  • PATCH api/friend_requests/:id - accept a friend request
  • DELETE api/friend_requests/:id - delete a request

friendships

  • DELETE api/friendships/:id -unfriend a user
Clone this wiki locally