From fd434a0c43cf44c6e23c4423c7cc83805f576ae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81sd=C3=ADs=20Erna=20Gu=C3=B0mundsd=C3=B3ttir?= Date: Thu, 14 Nov 2024 15:08:53 +0000 Subject: [PATCH] fix: add correct scope --- .../src/lib/health-directorate.resolver.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/api/domains/health-directorate/src/lib/health-directorate.resolver.ts b/libs/api/domains/health-directorate/src/lib/health-directorate.resolver.ts index 9473cac0eca2..234bbb70ca56 100644 --- a/libs/api/domains/health-directorate/src/lib/health-directorate.resolver.ts +++ b/libs/api/domains/health-directorate/src/lib/health-directorate.resolver.ts @@ -28,7 +28,6 @@ import { Features, } from '@island.is/nest/feature-flags' @UseGuards(IdsUserGuard, ScopesGuard, FeatureFlagGuard) -@Scopes(ApiScope.internal) @Audit({ namespace: '@island.is/api/health-directorate' }) @Resolver(() => OrganDonation) export class HealthDirectorateResolver { @@ -39,6 +38,7 @@ export class HealthDirectorateResolver { name: 'healthDirectorateOrganDonation', }) @Audit() + @Scopes(ApiScope.healthOrganDonation) @FeatureFlag(Features.servicePortalHealthOrganDonationPageEnabled) async getDonorStatus( @Args('locale', { type: () => String, nullable: true }) @@ -48,6 +48,7 @@ export class HealthDirectorateResolver { const data = await this.api.getDonorStatus(user, locale) return { donor: data, locale: locale } } + @ResolveField('organList', () => [Organ], { nullable: true, }) @@ -63,6 +64,7 @@ export class HealthDirectorateResolver { name: 'healthDirectorateOrganDonationUpdateDonorStatus', }) @Audit() + @Scopes(ApiScope.healthOrganDonation) @FeatureFlag(Features.servicePortalHealthOrganDonationPageEnabled) async updateDonorStatus( @Args('input') input: DonorInput, @@ -78,6 +80,7 @@ export class HealthDirectorateResolver { name: 'healthDirectorateVaccinations', }) @Audit() + @Scopes(ApiScope.healthVaccinations) @FeatureFlag(Features.servicePortalHealthVaccinationsPageEnabled) getVaccinations( @Args('locale', { type: () => String, nullable: true })