bank account
This commit is contained in:
@@ -15,6 +15,7 @@ import { SearchResellerInvoicesQueryDto } from './dto/search-reseller-invoices.d
|
||||
import { PaginationDto } from '../../common/DTO/pagination.dto';
|
||||
import { WalletsService } from '../wallets/providers/wallets.service';
|
||||
import { CreateWithdrawRequestDto } from './dto/create-withdraw-request.dto';
|
||||
import { CreateUserBankAccountDto } from './dto/create-user-bank-account.dto';
|
||||
|
||||
@Controller('reseller')
|
||||
@AuthGuards()
|
||||
@@ -127,8 +128,24 @@ export class ResellerController {
|
||||
@ApiOperation({ summary: "remove Reseller/Agent withdraw request ==> reseller route" })
|
||||
@ResellerRoute()
|
||||
@Delete('wallet/withdraw/:id')
|
||||
removeWithdrawRequest(@UserDec("id") userId: string) {
|
||||
return this.walletsService.getBalance(userId)
|
||||
removeWithdrawRequest(@UserDec("id") userId: string, @Param('id') id: string) {
|
||||
return this.resellerService.removeWithdrawRequest(userId, id)
|
||||
}
|
||||
|
||||
// ============ Bank Account =============
|
||||
@ApiOperation({ summary: "Create Bank Account ==> reseller route" })
|
||||
@ResellerRoute()
|
||||
@Post('bank-account')
|
||||
createBankAccount(@UserDec("id") userId: string, @Body() dto: CreateUserBankAccountDto) {
|
||||
return this.resellerService.createUserBankAccount(userId, dto)
|
||||
}
|
||||
|
||||
// ============ Remove Bank Account =============
|
||||
@ApiOperation({ summary: "remove User Bank account ==> reseller route" })
|
||||
@ResellerRoute()
|
||||
@Delete('bank-account/:id')
|
||||
removeBankAccount(@UserDec("id") userId: string, @Param('id') id: string) {
|
||||
return this.resellerService.deleteUserBankAccount(userId, id)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user