odenizddd / e-commerce-app

0 stars 0 forks source link

Write an endpoint for creating an order from shopping cart for a given user. #5

Closed odenizddd closed 3 weeks ago

odenizddd commented 3 weeks ago

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

  1. Write the initialization scripts to intitialize necessary tables. I think these would be the orders table and the orderItems table.
  2. 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.
  3. We need a function that will fetch orders and the contents of those orders so that users can view their orders.
odenizddd commented 3 weeks ago

Done