bank account

This commit is contained in:
2026-04-15 10:42:16 +03:30
parent 6f1217f063
commit 2b44b3cb2f
9 changed files with 147 additions and 14 deletions
+19 -2
View File
@@ -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)
}
}