SendGrid plugin (#77)

Closes #73 and #77
This commit is contained in:
Oliver Windall Juhl
2020-07-03 18:00:54 +02:00
committed by GitHub
parent 081c5278cb
commit d6fc477636
22 changed files with 6037 additions and 23 deletions
@@ -0,0 +1,23 @@
class UserSubscriber {
constructor({ sendgridService, eventBusService }) {
this.sendgridService_ = sendgridService
this.eventBus_ = eventBusService
this.eventBus_.subscribe("user.password_reset", async (data) => {
await this.sendgridService_.transactionalEmail(
"user.password_reset",
data
)
})
this.eventBus_.subscribe("customer.password_reset", async (data) => {
await this.sendgridService_.transactionalEmail(
"customer.password_reset",
data
)
})
}
}
export default UserSubscriber