Automatic stripe customers; address
This commit is contained in:
@@ -21,10 +21,13 @@ class OrderSubscriber {
|
||||
|
||||
this.eventBus_.subscribe("order.placed", async order => {
|
||||
await this.customerService_.addOrder(order.customer_id, order._id)
|
||||
await this.customerService_.addAddress(
|
||||
order.customer_id,
|
||||
order.shipping_address
|
||||
)
|
||||
|
||||
const address = {
|
||||
...order.shipping_address,
|
||||
}
|
||||
delete address._id
|
||||
|
||||
await this.customerService_.addAddress(order.customer_id, address)
|
||||
})
|
||||
|
||||
this.eventBus_.subscribe("order.placed", async order => {
|
||||
|
||||
Reference in New Issue
Block a user