The endpoint should receive and identifier from the client side such as a username or user id and than create an order that contains all of the items in the shopping cart. After the order is complete the shopping cart shoud be reset.
To achieve this
Write the initialization scripts to intitialize necessary tables. I think these would be the orders table and the orderItems table.
Write the database operation function to create an order that contains several order items. This function will be used to create the order after fetching the items from the shopping cart. This function should receive a user id or username for which the order will be created.
We need a function that will fetch orders and the contents of those orders so that users can view their orders.
The endpoint should receive and identifier from the client side such as a username or user id and than create an order that contains all of the items in the shopping cart. After the order is complete the shopping cart shoud be reset.
To achieve this