undo server code

This commit is contained in:
Selvi 2026-06-22 19:44:59 +05:30
parent 8017040708
commit a6b29d98eb

View File

@ -206,10 +206,14 @@ app.post('/create-order', async (req, res) => {
} }
}; };
orderPayload.order.note_attributes = [ if (customerData.contact_phone || customerData.contactNumber || customerData.contact_number) {
{ name: "Contact Number", value: customerData.contact_number || "" }, orderPayload.order.note_attributes = [
{ name: "Courier", value: customerData.courier || "" } {
]; 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`, { const shopifyResponse = await fetch(`https://${process.env.SHOPIFY_STORE_DOMAIN}/admin/api/2024-01/orders.json`, {
method: 'POST', method: 'POST',