Adds createFromCart and order.completed subscribers

This commit is contained in:
olivermrbl
2020-07-09 18:16:45 +02:00
parent 1e48ab3d74
commit 08cf7c7f2b
8 changed files with 119 additions and 10 deletions
@@ -7,6 +7,10 @@ class OrderSubscriber {
this.eventBus_.subscribe("order.placed", async (order) => {
await this.economicService_.draftEconomicInvoice(order)
})
this.eventBus_.subscribe("order.completed", async (order) => {
await this.economicService_.bookEconomicInvoice(order._id)
})
}
}