Skip to content

Backend routes

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

HTML


  • GET / StaticPagesController#root

API Endpoints


users

  • Get api/users - returns the user's posts
  • POST api/users - post on the users wall

session

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

posts

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

likes

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

friends

  • POST api/friends -request a friend
  • DELETE api/friends -unfriend/decline request
Clone this wiki locally