diff --git a/src/modules/reports/report-bookmark/report-bookmark.controller.ts b/src/modules/reports/report-bookmark/report-bookmark.controller.ts index 48a2acd..30e92a6 100644 --- a/src/modules/reports/report-bookmark/report-bookmark.controller.ts +++ b/src/modules/reports/report-bookmark/report-bookmark.controller.ts @@ -9,7 +9,7 @@ import { Query, } from '@nestjs/common'; import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'; -import { Public } from 'src/core/guards'; +import { ExcludePrivilege, Public } from 'src/core/guards'; import { MODULE_NAME } from 'src/core/strings/constants/module.constants'; import { GetLabelReportBookmarkDto, @@ -26,11 +26,13 @@ export class ReportBookmarkController { constructor(private service: ReportBookmarkService) {} @Post() + @ExcludePrivilege() async create(@Body() body: CreateReportBookmarkDto) { return await this.service.create(body); } @Get() + @ExcludePrivilege() async getAll(@Query() query: GetReportBookmarkDto) { return await this.service.getAll(query); } @@ -41,26 +43,31 @@ export class ReportBookmarkController { // } @Get('label-history') + @ExcludePrivilege() async getAllLabelHistory(@Query() query: GetLabelReportBookmarkDto) { return await this.service.getAllLabelHistory(query); } @Get('applied') + @ExcludePrivilege() async currentApplied(@Query() query: GetLabelReportBookmarkDto) { return await this.service.getCurrentAppliedBookmark(query); } @Put('applied/:id') + @ExcludePrivilege() async applied(@Param('id') id: string) { return await this.service.applied(id); } @Put('unapplied/:id') + @ExcludePrivilege() async unapplied(@Param('id') id: string) { return await this.service.unapplied(id); } @Delete(':id') + @ExcludePrivilege() async delete(@Param('id') id: string) { return await this.service.delete(id); } diff --git a/src/modules/reports/report-export/report-export.controller.ts b/src/modules/reports/report-export/report-export.controller.ts index 5ed60e8..318786a 100644 --- a/src/modules/reports/report-export/report-export.controller.ts +++ b/src/modules/reports/report-export/report-export.controller.ts @@ -8,7 +8,7 @@ import { Query, } from '@nestjs/common'; import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'; -import { Public } from 'src/core/guards'; +import { ExcludePrivilege, Public } from 'src/core/guards'; import { MODULE_NAME } from 'src/core/strings/constants/module.constants'; import { CreateReportExportDto } from '../shared/dto/report-export.create.dto'; import { @@ -26,27 +26,32 @@ export class ReportExportController { constructor(private service: ReportExportService) {} @Post() + @ExcludePrivilege() async create(@Body() body: CreateReportExportDto) { await this.service.create(body); return { message: 'Processing request export data.' }; } @Get() + @ExcludePrivilege() async getAll(@Query() query: GetReportExportDto) { return await this.service.getAll(query); } @Delete(':id') + @ExcludePrivilege() async delete(@Param('id') id: string) { return await this.service.delete(id); } @Get('processing') + @ExcludePrivilege() async getAllProcessing(@Query() query: GetReportExportProcessingDto) { return await this.service.getAllProcessing(query); } @Get('filename-history') + @ExcludePrivilege() async getListHistoryFileName(@Query() query: GetReportExportFileNameDto) { return await this.service.getListHistoryFileName(query); } diff --git a/src/modules/reports/report/report.controller.ts b/src/modules/reports/report/report.controller.ts index 315474b..26f3543 100644 --- a/src/modules/reports/report/report.controller.ts +++ b/src/modules/reports/report/report.controller.ts @@ -1,6 +1,6 @@ import { Body, Controller, Get, Post, Query } from '@nestjs/common'; import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'; -import { Public } from 'src/core/guards'; +import { ExcludePrivilege, Public } from 'src/core/guards'; import { MODULE_NAME } from 'src/core/strings/constants/module.constants'; import { ReportService } from './report.service'; import { GetReportConfigDto } from '../shared/dto/report-config.get.dto'; @@ -13,16 +13,19 @@ import { GetReportDataDto } from '../shared/dto/report-data.get.dto'; export class ReportController { constructor(private service: ReportService) {} @Get('config') + @ExcludePrivilege() async getReportConfig(@Query() query: GetReportConfigDto) { return await this.service.getReportConfig(query); } @Post('data') + @ExcludePrivilege() async getReportData(@Body() body: GetReportDataDto) { return await this.service.getReportData(body); } @Post('meta') + @ExcludePrivilege() async getReportMeta(@Body() body: GetReportDataDto) { return await this.service.getReportMeta(body); }