feat(SPG-1236): implement otp checker guard on booking transaction

pull/158/head
Firman Ramdhani 2025-06-19 16:32:48 +07:00
parent 8df836ff3e
commit 08a35dfdf4
1 changed files with 3 additions and 0 deletions

View File

@ -21,6 +21,7 @@ import { BatchIdsDto } from 'src/core/modules/infrastructure/dto/base-batch.dto'
import { Public } from 'src/core/guards';
import { DownloadPdfDto } from './dto/donwload-pdf.dto';
import { OtpAuthGuard } from 'src/modules/configuration/otp-verification/infrastructure/guards/otp-auth.guard';
import { OtpCheckerGuard } from 'src/core/guards/domain/otp-checker.guard';
@ApiTags(`${MODULE_NAME.TRANSACTION.split('-').join(' ')} - data`)
@Controller(`v1/${MODULE_NAME.TRANSACTION}`)
@ -53,6 +54,7 @@ export class TransactionDataController {
}
@Patch(':id/confirm-data')
@UseGuards(OtpCheckerGuard)
async confirmData(@Param('id') dataId: string): Promise<string> {
return await this.orchestrator.confirmData(dataId);
}
@ -63,6 +65,7 @@ export class TransactionDataController {
}
@Patch(':id/confirm')
@UseGuards(OtpCheckerGuard)
async confirm(@Param('id') dataId: string): Promise<string> {
return await this.orchestrator.confirm(dataId);
}