Skip to content

Commit

Permalink
campaign: slug/can-edit Remove keycloakId param
Browse files Browse the repository at this point in the history
It will be received by the auth header now
  • Loading branch information
sashko9807 committed Jun 18, 2023
1 parent 9cb1d65 commit c7a7e64
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions apps/api/src/campaign/campaign.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,12 @@ export class CampaignController {
return { campaign }
}

@Get(':slug/:keycloakId/can-edit')
@Public()
@Get(':slug/can-edit')
async canEditCampaign(
@Param('slug') slug: string,
@Param('keycloakId') keycloakId: string,
@AuthenticatedUser() user: KeycloakTokenParsed
): Promise<boolean> {
const campaign = await this.campaignService.isUserCampaign(keycloakId, slug)
const campaign = await this.campaignService.isUserCampaign(user.sub, slug)
return campaign
}

Expand Down

0 comments on commit c7a7e64

Please sign in to comment.