/api/v1/login
POST: Create auth token for session/api/v1/register
POST: Create new user and get auth token/api/v1/logout
POST: Logout the current session and destroy token
User Information (Send access token in header)
/api/v1/users
- GET: Get all the users in database
/api/v1/users/profile
- GET: Get the user info
- PATCH: Update the user
- DELETE: Delete the user
User Cart
-
/api/v1/users/cart
- GET: Get cart contents of user
- POST: Add product to cart
-
/api/v1/users/cart/:prod_id
- PATCH: Update product in cart
- DELETE: Delete product from cart
User Orders
-
/api/v1/users/orders
- GET: Get previous orders
- POST: Create new order
-
/api/v1/users/orders/:order_id
- GET: Get previous order details
/api/v1/products
- GET: Get all products from database
/api/v1/products/:id
- GET: Get specified product from database