fix: ppob callback
This commit is contained in:
parent
d2deb841f9
commit
c26294ac50
|
@ -155,14 +155,13 @@ export class TransactionController {
|
|||
};
|
||||
}
|
||||
|
||||
@Get('check-bill-history/:id')
|
||||
@Get('check-bill-history')
|
||||
async getCheckBillHistory(
|
||||
@Param('id') id: string,
|
||||
@Request() req,
|
||||
) {
|
||||
const data = await this.transactionService.findOne(
|
||||
const data = await this.transactionService.findAll(
|
||||
req.user.userId,
|
||||
id,
|
||||
);
|
||||
|
||||
return {
|
||||
|
|
|
@ -1399,6 +1399,36 @@ export class TransactionService {
|
|||
}
|
||||
}
|
||||
|
||||
async findAll(user: string) {
|
||||
try {
|
||||
return this.checkBillHistoryRepository.find({
|
||||
where: {
|
||||
user: user,
|
||||
},
|
||||
select: [
|
||||
'amount',
|
||||
'admin_price',
|
||||
'product_code',
|
||||
'destination',
|
||||
'trx_id',
|
||||
'partner_trx_id',
|
||||
'createdAt',
|
||||
],
|
||||
order: {
|
||||
createdAt: 'DESC',
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Billing not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
async topUpHistoryByUser(
|
||||
page: number,
|
||||
user: string,
|
||||
|
|
Loading…
Reference in New Issue
Block a user