undo server code
This commit is contained in:
parent
8017040708
commit
a6b29d98eb
12
server.js
12
server.js
@ -206,10 +206,14 @@ app.post('/create-order', async (req, res) => {
|
||||
}
|
||||
};
|
||||
|
||||
orderPayload.order.note_attributes = [
|
||||
{ name: "Contact Number", value: customerData.contact_number || "" },
|
||||
{ name: "Courier", value: customerData.courier || "" }
|
||||
];
|
||||
if (customerData.contact_phone || customerData.contactNumber || customerData.contact_number) {
|
||||
orderPayload.order.note_attributes = [
|
||||
{
|
||||
name: 'Contact Number',
|
||||
value: customerData.contact_phone || customerData.contactNumber || customerData.contact_number
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
const shopifyResponse = await fetch(`https://${process.env.SHOPIFY_STORE_DOMAIN}/admin/api/2024-01/orders.json`, {
|
||||
method: 'POST',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user