feat: Add a simple configurable notifications subscriber (#7331)
* feat: Add a simple configurable notifications subscriber that is configurable * Proposal on awaiting all subscribers to run * fix: Clean up wait subscribers util and notifications test --------- Co-authored-by: adrien2p <adrien.deperetti@gmail.com>
This commit is contained in:
1 parent
2e42e053d4
commit
ee924b1b28
27 files changed
+295
-740
No files matched your search
+1
-1
@@ -30,7 +30,7 @@ describe("Local notification provider", () => {
|
||||
|
||||
expect(logSpy).toHaveBeenCalled()
|
||||
expect(logSpy).toHaveBeenCalledWith(
|
||||
'Attempting to send a notification to: test@medusajs.com on the channel: email with template: some-template and data: {"username":"john-doe"}'
|
||||
`Attempting to send a notification to: 'test@medusajs.com' on the channel: 'email' with template: 'some-template' and data: '{\"username\":\"john-doe\"}'`
|
||||
)
|
||||
})
|
||||
})
|
||||
@@ -38,9 +38,9 @@ export class LocalNotificationService extends AbstractNotificationProviderServic
|
||||
}
|
||||
|
||||
const message =
|
||||
`Attempting to send a notification to: ${notification.to}` +
|
||||
` on the channel: ${notification.channel} with template: ${notification.template}` +
|
||||
` and data: ${JSON.stringify(notification.data)}`
|
||||
`Attempting to send a notification to: '${notification.to}'` +
|
||||
` on the channel: '${notification.channel}' with template: '${notification.template}'` +
|
||||
` and data: '${JSON.stringify(notification.data)}'`
|
||||
|
||||
this.logger_.info(message)
|
||||
return {}
|
||||
|
||||
Reference in new issue
Block a user