Skip to content

Backend Routes

Almoe099 edited this page Jan 11, 2024 · 6 revisions

HTML

  • GET / StaticPagesController#FrontendIndex

API Endpoints

users

  • GET /api/users - Return user's information
  • POST /api/users - Sign up new users

session

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

products

  • GET /api/products - return all products (filtered by data/params)
  • GET /api/products/:id - return specific product

reviews

  • GET /api/reviews/:id - Returns specific product review
  • POST /api/reviews - Add a new review for a product
  • PATCH /api/reviews/:id - Edit review
  • DELETE /api/reviews/:id - Delete review

cart

  • POST /api/cart - Creates a new user cart
  • PATCH /api/cart/:id - Updates user's cart
  • DELETE /api/cart/:id - Deletes user cart
Clone this wiki locally