Backend routes - UJPyon/behold GitHub Wiki

Backend Routes

HTML

  • GET / StaticPagesController#root

API Endpoints

users

  • GET /api/users/:id - returns the user's information and portfolios
  • GET /api/users/search - searches for and returns the user's email if it already exist
  • POST /api/users - sign up
  • PATCH /api/users/:id - users can edit their profiles

session

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

projects

  • GET /api/projects - returns all projects
  • GET /api/projects/:id - returns a specific project

comments

  • POST /api/projects/:project_id/comments - posts a comment to a project
  • DELETE /api/projects/:project_id/comments - removes a comment from a project

appreciations

  • POST /api/projects/:projects_id/appreciations - appreciate a project
  • DELETE /api/projects/:projects_id/appreciations - remove appreciation of a project