Open hinchley2018 opened 7 months ago
Talk with @saandre0217 to make sure you are both creating the same order schema this is what was discussed in discord
{
OrderID: String
Customer: {
name: string
...
},
OrderDate: Date,
PaymentAmount: Number,
Products: [
{
ProductName: string
ProductAmount: Number
...
}
]
}
Create an endpoint /orders that accepts POST requests
An order is associated to a user id User email allowing system to notify users when item moves Each order has a list of products and a quantity of each product Order total
Any missing fields or null should throw a 400 bad request with the field that is missing
If the request has all fields then you can insert the record into the orders collection
On success return the order id