Skip to content

Backend Routes

FarzamA edited this page Oct 28, 2021 · 5 revisions

HTML

  • GET / StaticPagesController#root

API Endpoints

users

  • GET /api/users/:id - Fetch user information for profile page, post, or comment
  • POST /api/users - Create a new user after signup
  • PATCH /api/users/:id - Update to user profile
  • DELETE /api/users - Remove user account unless demo user

experiences

  • GET /api/experiences - Fetch experience information for user
  • POST /api/experiences - Add experience
  • PATCH /api/experiences/:id - Edit experience
  • DELETE /api/experiences/:id - Remove experience

educations

  • GET /api/educations - Fetch education information for user
  • POST /api/educations - Add education
  • PATCH /api/educations/:id - Edit education
  • DELETE /api/educations/:id - Remove education

connections

  • GET /api/connections - Fetch user connections
  • POST /api/connections/:id - Create connection
  • DELETE /api/connections/:id - Remove connection

posts

  • GET /api/posts - Fetch current user posts
  • POST /api/user/:id/posts - Create post
  • PATCH /api/posts/:id - Edit post
  • DELETE /api/posts/:id - Remove post

comments

  • GET /api/comments - Fetches all comments on a post
  • POST /api/comments - Create a new comment
  • PATCH /api/comments/:id - Edit a comment
  • DELETE /api/comments/:id - Remove comment

likes

  • POST /api/likes - Like a post
  • DELETE /api/likes/:id - Unlike a post

Clone this wiki locally