fix: move history user code
This commit is contained in:
parent
b63ba1063c
commit
1458d60041
|
@ -125,6 +125,30 @@ export class TransactionController {
|
|||
};
|
||||
}
|
||||
|
||||
@Get('history-user/:id')
|
||||
async getHistoryTransactionUserByParam(
|
||||
@Query('page') page: number,
|
||||
@Query('pageSize') pageSize: number,
|
||||
@Query('start') startDate: string,
|
||||
@Query('end') endDate: string,
|
||||
@Param('id', ParseUUIDPipe) id: string,
|
||||
) {
|
||||
const data = await this.transactionService.transactionHistoryByUser(
|
||||
page,
|
||||
id,
|
||||
startDate == 'null' ? null : startDate,
|
||||
endDate == 'null' ? null : endDate,
|
||||
pageSize,
|
||||
);
|
||||
|
||||
return {
|
||||
...data,
|
||||
statusCode: HttpStatus.OK,
|
||||
message: 'success',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@Get('history-deposit')
|
||||
async getHistoryDepositUser(
|
||||
@Query('page') page: number,
|
||||
|
@ -219,29 +243,6 @@ export class TransactionController {
|
|||
};
|
||||
}
|
||||
|
||||
@Get('history-user/:id')
|
||||
async getHistoryTransactionUserByParam(
|
||||
@Query('page') page: number,
|
||||
@Query('pageSize') pageSize: number,
|
||||
@Query('start') startDate: string,
|
||||
@Query('end') endDate: string,
|
||||
@Param('id', ParseUUIDPipe) id: string,
|
||||
) {
|
||||
const data = await this.transactionService.transactionHistoryByUser(
|
||||
page,
|
||||
id,
|
||||
startDate == 'null' ? null : startDate,
|
||||
endDate == 'null' ? null : endDate,
|
||||
pageSize,
|
||||
);
|
||||
|
||||
return {
|
||||
...data,
|
||||
statusCode: HttpStatus.OK,
|
||||
message: 'success',
|
||||
};
|
||||
}
|
||||
|
||||
@Put('deposit-return/confirmation/:id/:status')
|
||||
async confirmDepositReturn(
|
||||
@Param('id', ParseUUIDPipe) id: string,
|
||||
|
|
Loading…
Reference in New Issue
Block a user