new endpoints
This commit is contained in:
@@ -116,22 +116,30 @@ export class ResellerController {
|
||||
return this.walletsService.getBalance(userId)
|
||||
}
|
||||
|
||||
// ============ WithDraw Request =============
|
||||
// ============Payment WithDraw Request =============
|
||||
@ApiOperation({ summary: "Create Reseller/Agent withdraw request ==> reseller route" })
|
||||
@ResellerRoute()
|
||||
@Post('wallet/withdraw')
|
||||
@Post('payment/withdraw')
|
||||
withdrawRequest(@UserDec("id") userId: string, @Body() dto: CreateWithdrawRequestDto) {
|
||||
return this.resellerService.createWithdrawRequest(userId, dto.amount)
|
||||
}
|
||||
|
||||
// ============ Remove WithDraw Request =============
|
||||
// ============ Remove payment WithDraw Request =============
|
||||
@ApiOperation({ summary: "remove Reseller/Agent withdraw request ==> reseller route" })
|
||||
@ResellerRoute()
|
||||
@Delete('wallet/withdraw/:id')
|
||||
@Delete('paymant/withdraw/:id')
|
||||
removeWithdrawRequest(@UserDec("id") userId: string, @Param('id') id: string) {
|
||||
return this.resellerService.removeWithdrawRequest(userId, id)
|
||||
}
|
||||
|
||||
// ============ Payment list=============
|
||||
@ApiOperation({ summary: "Get Payment list ==> reseller route" })
|
||||
@ResellerRoute()
|
||||
@Get('payment')
|
||||
getPayments(@UserDec("id") userId: string, @Body() dto: SearchRewardsRequestQueryDto) {
|
||||
return this.resellerService.getRewrdsRequests(userId, dto)
|
||||
}
|
||||
|
||||
// ============ Bank Account =============
|
||||
@ApiOperation({ summary: "Create Bank Account ==> reseller route" })
|
||||
@ResellerRoute()
|
||||
@@ -140,6 +148,15 @@ export class ResellerController {
|
||||
return this.resellerService.createUserBankAccount(userId, dto)
|
||||
}
|
||||
|
||||
|
||||
// ============ Get Bank Account =============
|
||||
@ApiOperation({ summary: "Get Bank Account ==> reseller route" })
|
||||
@ResellerRoute()
|
||||
@Get('bank-account')
|
||||
getBankAccount(@UserDec("id") userId: string) {
|
||||
return this.resellerService.getUserBankAccount(userId)
|
||||
}
|
||||
|
||||
// ============ Remove Bank Account =============
|
||||
@ApiOperation({ summary: "remove User Bank account ==> reseller route" })
|
||||
@ResellerRoute()
|
||||
|
||||
Reference in New Issue
Block a user