- fix when base url stg cannot order on prod

This commit is contained in:
Muhammad Fadli 2023-09-14 15:02:36 +07:00
parent e4811a4ad6
commit 8f731226ee

View File

@ -90,6 +90,16 @@ export class TransactionController {
@Body() orderTransactionDto: OrderTransactionDto, @Body() orderTransactionDto: OrderTransactionDto,
@Request() req, @Request() req,
) { ) {
if (req.get('host').includes('ppob-backend.k3s.bangun-kreatif.com')) {
return {
data: await this.transactionService.orderTransaction(
orderTransactionDto,
req.user,
),
statusCode: HttpStatus.CREATED,
message: 'success',
};
} else {
return { return {
data: await this.transactionService.orderTransactionProd( data: await this.transactionService.orderTransactionProd(
orderTransactionDto, orderTransactionDto,
@ -99,6 +109,7 @@ export class TransactionController {
message: 'success', message: 'success',
}; };
} }
}
@Post('order-bill-prod') @Post('order-bill-prod')
async orderTransactioBillnProd( async orderTransactioBillnProd(