Backend Routes - skygit97/ConnectMe GitHub Wiki

HTML

  • GET / - StaticPagesController#root

API Endpoints

users

  • GET /api/users - returns a list of all users
  • GET /api/users/:id - returns user profile information
  • POST /api/users - sign up
  • PATCH /api/users/:id - edits the current user's profile information

session

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

posts

  • GET /api/posts - returns posts by the current user and their friends (filtered by data/params)
  • GET /api/posts/:id - returns a post
  • POST /api/posts - creates a post
  • PATCH /api/posts/:id - edits a post
  • DELETE /api/posts/:id - removes a post

comments

  • GET /api/comments - returns comments on a post (filtered by data/params)
  • POST /api/comments - creates a comment
  • PATCH /api/comments/:id - edits a comment
  • DELETE /api/comments/:id - removes a comment

likes

  • GET /api/likes - returns likes on a post (filtered by data/params)
  • POST /api/likes - creates a like
  • DELETE /api/likes/:id - removes a like