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
Adding and removing items from the shopping cart are common actions for users, generating an HTTP request to update the shopping cart based on the type of action. If the 'flagOfAction' is 'adding' an item, the handler fetches the current shopping cart and adds the new item to the cart, then save the shopping cart in the database. It is possible user wants to remove an item from the shopping cart, If the 'flagOfAction' is 'deleting' an item, the handler fetches the shopping cart and remove the item from the shopping cart, save the shopping cart in the database again. if the flag (flagOfAction) is not addin or removing the handler should return a 400 response should be returned with a description. Since the user already logged in the system and tried to update the shopping cart, the function should store a log from the items the user add or remove from the shopping cart for future item recommendations. The handler may make use of a 3rd party persistence library. If any of the input arguments are empty or null, a 400 response should be returned with a description.
Important notes: the endpoint address is "/updateShoppingCart", the URL query parameters are: "userId" , "itemId", and "flagOfAction". flagOfAction only has the values :"adding",and "removing".
The text was updated successfully, but these errors were encountered:
Adding and removing items from the shopping cart are common actions for users, generating an HTTP request to update the shopping cart based on the type of action. If the 'flagOfAction' is 'adding' an item, the handler fetches the current shopping cart and adds the new item to the cart, then save the shopping cart in the database. It is possible user wants to remove an item from the shopping cart, If the 'flagOfAction' is 'deleting' an item, the handler fetches the shopping cart and remove the item from the shopping cart, save the shopping cart in the database again. if the flag (flagOfAction) is not addin or removing the handler should return a 400 response should be returned with a description. Since the user already logged in the system and tried to update the shopping cart, the function should store a log from the items the user add or remove from the shopping cart for future item recommendations. The handler may make use of a 3rd party persistence library. If any of the input arguments are empty or null, a 400 response should be returned with a description.
Important notes: the endpoint address is "/updateShoppingCart", the URL query parameters are: "userId" , "itemId", and "flagOfAction". flagOfAction only has the values :"adding",and "removing".
The text was updated successfully, but these errors were encountered: