Describe the bug
The addItemOrUpdateItemQuantity API assumes that a user always has a cart.
If the user has no cart yet, the API throws an error when trying to access cart.items
To Reproduce
Ensure the user has no cart in the database.
Call the Add Item to Cart API.
Observe the error: Cannot read property 'items' of null.
Expected behavior
If the user does not have a cart, a new cart should be created automatically and the product should be added successfully.
Screenshots
OS
windows
OS Version
11
Client
Postman
Additional context or Information
No response