Skip to content

Commit

Permalink
add authentication guard
Browse files Browse the repository at this point in the history
  • Loading branch information
bahram1249 committed Mar 16, 2024
1 parent f0d8609 commit 71f7f64
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ import {
Get,
HttpCode,
HttpStatus,
UseGuards,
UseInterceptors,
} from '@nestjs/common';

import { JsonResponseTransformInterceptor } from '@rahino/response/interceptor';
import { ApiOperation, ApiTags } from '@nestjs/swagger';
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
import { DiscountActionRuleService } from './discount-action-rule.service';
import { JwtGuard } from '@rahino/auth/guard';

@ApiTags('Admin-DiscountActionRules')
@ApiBearerAuth()
@UseGuards(JwtGuard)
@Controller({
path: '/api/ecommerce/admin/discountActionRules',
version: ['1'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ import {
Get,
HttpCode,
HttpStatus,
UseGuards,
UseInterceptors,
} from '@nestjs/common';

import { JsonResponseTransformInterceptor } from '@rahino/response/interceptor';
import { ApiOperation, ApiTags } from '@nestjs/swagger';
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
import { DiscountActionTypeService } from './discount-action-type.service';
import { JwtGuard } from '@rahino/auth/guard';

@ApiTags('Admin-DiscountActionTypes')
@ApiBearerAuth()
@UseGuards(JwtGuard)
@Controller({
path: '/api/ecommerce/admin/discountActionTypes',
version: ['1'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ import {
Get,
HttpCode,
HttpStatus,
UseGuards,
UseInterceptors,
} from '@nestjs/common';

import { JsonResponseTransformInterceptor } from '@rahino/response/interceptor';
import { ApiOperation, ApiTags } from '@nestjs/swagger';
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
import { DiscountTypeService } from './discount-type.service';
import { JwtGuard } from '@rahino/auth/guard';

@ApiTags('Admin-DiscountTypes')
@ApiBearerAuth()
@UseGuards(JwtGuard)
@Controller({
path: '/api/ecommerce/admin/discountTypes',
version: ['1'],
Expand Down

0 comments on commit 71f7f64

Please sign in to comment.