You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create (First time registeration) /users/register [POST]
Orders and Order Products
Current Order by user (args: user id)[token required] /orders/users/:id [GET]
Create Order (args: Object containing productId, orderId, quantity, userId, status) /orders [POST]
Note: The way the order is created works by checking if an order has already been created with the same id, if not a new order is created and all the products information can be found in the order_products table
Data Shapes
Product
id: SERIAL PRIMARY KEY
name: VARCHAR(255)
price: INTEGER
category: VARCHAR(255)
User
id: SERIAL PRIMARY KEY
first_name: VARCHAR(255)
last_name: VARCHAR(255)
password_digest: VARCHAR(255)
Note: The password_digest field holds the password after it's been hashed using bcrypt
Orders
id: SERIAL PRIMARY KEY
status: VARCHAR(255)
Order Products
product_id: INTEGER, Primary key of Products table