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