4
0
forked from crowetic/commerce

Add channel id when creating a cart

This commit is contained in:
Luis Alvarez 2020-10-27 00:27:17 -05:00
parent a6772c136a
commit 3e7b1f833f

View File

@ -20,6 +20,9 @@ const addItem: CartHandlers['addItem'] = async ({
method: 'POST',
body: JSON.stringify({
line_items: [parseCartItem(item)],
...(!cartId && config.storeChannelId
? { channel_id: config.storeChannelId }
: {}),
}),
}
const { data } = cartId