fix(notification): Only use enabled providers for notis (#10659)
This commit is contained in:
1 parent
c7008bb569
commit
9133957a94
1 file changed
+3
-1
@@ -68,7 +68,9 @@ export default class NotificationProviderService extends ModulesSdkUtils.MedusaI
|
|||||||
TOutput = TChannel extends string[] ? Provider[] : Provider | undefined
|
TOutput = TChannel extends string[] ? Provider[] : Provider | undefined
|
||||||
>(channels: TChannel): Promise<TOutput> {
|
>(channels: TChannel): Promise<TOutput> {
|
||||||
if (!this.providersCache) {
|
if (!this.providersCache) {
|
||||||
const providers = await this.notificationProviderRepository_.find()
|
const providers = await this.notificationProviderRepository_.find({
|
||||||
|
where: { is_enabled: true },
|
||||||
|
})
|
||||||
|
|
||||||
this.providersCache = new Map(
|
this.providersCache = new Map(
|
||||||
providers.flatMap((provider) =>
|
providers.flatMap((provider) =>
|
||||||
|
|||||||
Reference in new issue
Block a user