2026-04-23 20:59:39 +03:30
|
|
|
import { Body, Controller, Get, Param, Post } from '@nestjs/common'
|
|
|
|
|
import { ApiTags } from '@nestjs/swagger'
|
|
|
|
|
import { PartnerAccountChargeTransactionService } from './chargeAccountQuotaTransactions.service'
|
|
|
|
|
import { ChargeAccountQuotaDto } from './dto/chargeAccountQuotaTransactions.dto'
|
2026-04-27 10:45:39 +03:30
|
|
|
import type { PartnerAccountChargeTransactionServiceCreateResponseDto, PartnerAccountChargeTransactionServiceFindAllResponseDto, PartnerAccountChargeTransactionServiceFindOneResponseDto } from './dto/chargeAccountQuotaTransactions-response.dto'
|
2026-04-23 20:59:39 +03:30
|
|
|
|
|
|
|
|
@ApiTags('Admin Partner Account Charge')
|
|
|
|
|
@Controller('admin/partners/:partnerId/charge-account-transactions')
|
|
|
|
|
export class PartnerAccountChargeTransactionController {
|
|
|
|
|
constructor(private readonly service: PartnerAccountChargeTransactionService) {}
|
|
|
|
|
|
|
|
|
|
@Get()
|
2026-04-27 10:45:39 +03:30
|
|
|
async findAll(@Param('partnerId') partnerId: string): Promise<PartnerAccountChargeTransactionServiceFindAllResponseDto> {
|
2026-04-23 20:59:39 +03:30
|
|
|
return this.service.findAll(partnerId)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Get(':id')
|
2026-04-27 10:45:39 +03:30
|
|
|
async findOne(@Param('partnerId') partnerId: string, @Param('id') id: string): Promise<PartnerAccountChargeTransactionServiceFindOneResponseDto> {
|
2026-04-23 20:59:39 +03:30
|
|
|
return this.service.findOne(partnerId, id)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Post()
|
|
|
|
|
async create(
|
|
|
|
|
@Param('partnerId') partnerId: string,
|
|
|
|
|
@Body() data: ChargeAccountQuotaDto,
|
2026-04-27 10:45:39 +03:30
|
|
|
): Promise<PartnerAccountChargeTransactionServiceCreateResponseDto> {
|
2026-04-23 20:59:39 +03:30
|
|
|
return this.service.create(partnerId, data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// @Patch(':id')
|
|
|
|
|
// async update(
|
|
|
|
|
// @Param('partnerId') partnerId: string,
|
|
|
|
|
// @Param('id') id: string,
|
|
|
|
|
// @Body() data: UpdateLicenseDto,
|
|
|
|
|
// ) {
|
|
|
|
|
// return this.licensesService.update(partnerId, id, data)
|
|
|
|
|
// }
|
|
|
|
|
}
|