Skip to content

Commit

Permalink
add guard for routes
Browse files Browse the repository at this point in the history
  • Loading branch information
ZigBalthazar committed Feb 2, 2025
1 parent 27e77ac commit 077f1ef
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/modules/subscriptions/subscriptions.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,15 @@ export class SubscriptionsController {
return this.subscriptionService.seedRedis();
}

@UseGuards(JwtAuthGuard)
@ApiBearerAuth()
@Patch(':id')
updateSubscription(@Param('id') id: string, @Body() props: UpdateSubscriptionDto) {
return this.subscriptionService.updateSubscription(id, props);
}

@UseGuards(JwtAuthGuard)
@ApiBearerAuth()
@Delete(':id')
deleteSubscription(@Param('id') id: string) {
return this.subscriptionService.deleteSubscription(id);
Expand Down

0 comments on commit 077f1ef

Please sign in to comment.