Adds api and subscriber

This commit is contained in:
olivermrbl
2020-07-09 14:46:01 +02:00
parent 1da69a33c1
commit 154564b80a
2 changed files with 13 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
class OrderSubscriber {
constructor({ economicService, eventBusService }) {
this.economicService_ = economicService
this.eventBus_ = eventBusService
this.eventBus_.subscribe("order.placed", async (order) => {
await this.economicService_.draftEconomicInvoice(order)
})
}
}
export default OrderSubscriber