Backend Routes - Heba11-22/kiddos GitHub Wiki

api/auth

POST /login

  • This route logs a user in.

GET /logout

  • This route logs a user out.

POST /signup

  • This route allows a user to sign up for an account.

api/users

GET /:id

  • This route returns a single user.

api/

GET /

  • This route returns suggested items.

GET /:user-id/saved-items

  • This route returns a list of all items the user has been liked and saves to the saved-items page.

POST /search

  • This route returns a list of items with items matching a portion of the search string.

GET /checkout

  • This route returns a form which enables the users to enter their card information to be able to checkout .

POST /checkout

  • This route posts the users cards information to buy and checkout their items.

api/items

GET /:id

  • This route returns a single item.

POST /:id/saved-items

  • This route add an item to the saved-items page.

POST /:id/cart

  • This route add an item to the saved-items page.

api/cart

GET /

  • This route returns all the items in the cart.

PATCH /:id

  • This route edits a single item in the cart.

DELETE /:id

  • This route deletes a single item in the cart.

api/categories. ?????????????????????

GET /

  • This route returns all the categories.