refactor: rename shipping to shipping_id

This commit is contained in:
Vlad Stan 2023-03-30 13:59:40 +03:00
parent 39bcbfb035
commit f80a75e90c

View file

@ -185,7 +185,7 @@ async function customerStall(path) {
items: Array.from(this.cart.products, p => { items: Array.from(this.cart.products, p => {
return {product_id: p[0], quantity: p[1].quantity} return {product_id: p[0], quantity: p[1].quantity}
}), }),
shipping: orderData.shippingzone shipping_id: orderData.shippingzone
} }
orderObj.id = await hash( orderObj.id = await hash(
[orderData.pubkey, created_at, JSON.stringify(orderObj)].join(':') [orderData.pubkey, created_at, JSON.stringify(orderObj)].join(':')
@ -269,7 +269,7 @@ async function customerStall(path) {
items: Array.from(this.cart.products, p => { items: Array.from(this.cart.products, p => {
return {product_id: p[0], quantity: p[1].quantity} return {product_id: p[0], quantity: p[1].quantity}
}), }),
shipping: orderData.shippingzone shipping_id: orderData.shippingzone
} }
let created_at = Math.floor(Date.now() / 1000) let created_at = Math.floor(Date.now() / 1000)
orderObj.id = await hash( orderObj.id = await hash(