Skip to content

Commit

Permalink
fix(api): add correct scope (#16874)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and jonnigs committed Nov 26, 2024
1 parent 33442b4 commit 48c0f45
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -39,6 +38,7 @@ export class HealthDirectorateResolver {
name: 'healthDirectorateOrganDonation',
})
@Audit()
@Scopes(ApiScope.healthOrganDonation)
@FeatureFlag(Features.servicePortalHealthOrganDonationPageEnabled)
async getDonorStatus(
@Args('locale', { type: () => String, nullable: true })
Expand All @@ -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,
})
Expand All @@ -63,6 +64,7 @@ export class HealthDirectorateResolver {
name: 'healthDirectorateOrganDonationUpdateDonorStatus',
})
@Audit()
@Scopes(ApiScope.healthOrganDonation)
@FeatureFlag(Features.servicePortalHealthOrganDonationPageEnabled)
async updateDonorStatus(
@Args('input') input: DonorInput,
Expand All @@ -78,6 +80,7 @@ export class HealthDirectorateResolver {
name: 'healthDirectorateVaccinations',
})
@Audit()
@Scopes(ApiScope.healthVaccinations)
@FeatureFlag(Features.servicePortalHealthVaccinationsPageEnabled)
getVaccinations(
@Args('locale', { type: () => String, nullable: true })
Expand Down

0 comments on commit 48c0f45

Please sign in to comment.