Skip to content

Commit

Permalink
Fixed API response issue (#131)
Browse files Browse the repository at this point in the history
Cleaned up how we pull data product data
  • Loading branch information
dijs authored Aug 27, 2020
1 parent 60becd0 commit 73cef41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-storefront",
"version": "8.16.1",
"version": "8.16.2",
"description": "Build and deploy e-commerce progressive web apps (PWAs) in record time.",
"module": "./index.js",
"license": "Apache-2.0",
Expand Down
8 changes: 4 additions & 4 deletions src/mock-connector/addToCart.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export default async function addToCart(product, quantity, req, res) {
const { id, color, size } = product
export default async function addToCart({ color, size, product }, req, res) {
const { id, quantity } = product

console.log('product id: ', id)
console.log('color id: ', color || 'Not provided')
console.log('size id: ', size || 'Not provided')
console.log('quantity ', quantity)
console.log('quantity ', quantity || 1)

return {}
return { added: true, id }
}

0 comments on commit 73cef41

Please sign in to comment.