-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "Add to cart" api endpoint #87
Comments
Might need more of a discussion but I think here is where we should also build the cart record if one isn't passed in. |
That's the kind of flow we want to enable, and a cookie with cart ID seems like a good solution. So just to be clear, the API endpoint will either respond with 204 No Content or 200 OK with a cartID as the response body, assuming happy flow. Is that ok with you guys? |
Sounds good i have no idea how cookies work but i guess now is as good a time as any |
I think we may be able to avoid the round trip and just have the client generate the cart id since it's a guid. |
yeah and this action would only happen once the first item is added right ? after that would we not want the cookie to store the guid ? |
Gonna setup a PR draft for this as I think its going to require a few steps to complete |
We would still want to store the cart id, we’d just already have it before sending the request if we go with this route. You can go with whatever approach though, whichever you think is easier! |
This task is complete I forgot to add the PR to the issue |
Need to add a endpoint to the cart controller that takes a product id & quantity and adds to our cart
The text was updated successfully, but these errors were encountered: