feat(SPG-1236): implement otp checker guard on booking transaction
parent
8df836ff3e
commit
08a35dfdf4
|
@ -21,6 +21,7 @@ import { BatchIdsDto } from 'src/core/modules/infrastructure/dto/base-batch.dto'
|
||||||
import { Public } from 'src/core/guards';
|
import { Public } from 'src/core/guards';
|
||||||
import { DownloadPdfDto } from './dto/donwload-pdf.dto';
|
import { DownloadPdfDto } from './dto/donwload-pdf.dto';
|
||||||
import { OtpAuthGuard } from 'src/modules/configuration/otp-verification/infrastructure/guards/otp-auth.guard';
|
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`)
|
@ApiTags(`${MODULE_NAME.TRANSACTION.split('-').join(' ')} - data`)
|
||||||
@Controller(`v1/${MODULE_NAME.TRANSACTION}`)
|
@Controller(`v1/${MODULE_NAME.TRANSACTION}`)
|
||||||
|
@ -53,6 +54,7 @@ export class TransactionDataController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Patch(':id/confirm-data')
|
@Patch(':id/confirm-data')
|
||||||
|
@UseGuards(OtpCheckerGuard)
|
||||||
async confirmData(@Param('id') dataId: string): Promise<string> {
|
async confirmData(@Param('id') dataId: string): Promise<string> {
|
||||||
return await this.orchestrator.confirmData(dataId);
|
return await this.orchestrator.confirmData(dataId);
|
||||||
}
|
}
|
||||||
|
@ -63,6 +65,7 @@ export class TransactionDataController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Patch(':id/confirm')
|
@Patch(':id/confirm')
|
||||||
|
@UseGuards(OtpCheckerGuard)
|
||||||
async confirm(@Param('id') dataId: string): Promise<string> {
|
async confirm(@Param('id') dataId: string): Promise<string> {
|
||||||
return await this.orchestrator.confirm(dataId);
|
return await this.orchestrator.confirm(dataId);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue