From c037c1956676f942839dcbd87859ed45f2e4a885 Mon Sep 17 00:00:00 2001 From: Biswajeet Das Date: Thu, 5 Oct 2023 15:36:34 +0530 Subject: [PATCH 1/2] feat: allow fetching of no level preferences as template --- .../get-subscriber-template-preference.usecase.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/application-generic/src/usecases/get-subscriber-template-preference/get-subscriber-template-preference.usecase.ts b/packages/application-generic/src/usecases/get-subscriber-template-preference/get-subscriber-template-preference.usecase.ts index e4e36cc511d..945343ce2c4 100644 --- a/packages/application-generic/src/usecases/get-subscriber-template-preference/get-subscriber-template-preference.usecase.ts +++ b/packages/application-generic/src/usecases/get-subscriber-template-preference/get-subscriber-template-preference.usecase.ts @@ -5,7 +5,6 @@ import { SubscriberRepository, SubscriberEntity, MessageTemplateRepository, - PreferenceLevelEnum, } from '@novu/dal'; import { ChannelTypeEnum, @@ -54,7 +53,6 @@ export class GetSubscriberTemplatePreference { _environmentId: command.environmentId, _subscriberId: subscriber._id, _templateId: command.template._id, - level: PreferenceLevelEnum.TEMPLATE, }); const subscriberChannelPreference = subscriberPreference?.channels; From 0518d14f9c088bb50bc34d5b928fe53583a2b34c Mon Sep 17 00:00:00 2001 From: Biswajeet Das Date: Thu, 5 Oct 2023 16:04:21 +0530 Subject: [PATCH 2/2] feat: allow fetching of no level preferences as template --- .../update-subscriber-preference.usecase.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/api/src/app/subscribers/usecases/update-subscriber-preference/update-subscriber-preference.usecase.ts b/apps/api/src/app/subscribers/usecases/update-subscriber-preference/update-subscriber-preference.usecase.ts index ceac6dbf431..ad62e702f54 100644 --- a/apps/api/src/app/subscribers/usecases/update-subscriber-preference/update-subscriber-preference.usecase.ts +++ b/apps/api/src/app/subscribers/usecases/update-subscriber-preference/update-subscriber-preference.usecase.ts @@ -120,7 +120,6 @@ export class UpdateSubscriberPreference { _organizationId: command.organizationId, _subscriberId: subscriber._id, _templateId: command.templateId, - level: PreferenceLevelEnum.TEMPLATE, }, { $set: updatePayload,