Files
psp_api/src/modules/admin/partners/chargeAccountQoutaTransactions/chargeAccountQuotaTransactions.controller.ts
T
ahasani dee96b6e91 feat: add response DTOs for various services across modules
- Created response DTOs for ConfigService, AppService, AuthService, CatalogsService, AccountsService, BusinessActivityComplexesService, ComplexPosesService, SalesInvoicesService, BusinessActivitiesService, ConsumerBusinessActivityGoodsService, and others.
- Implemented Create, FindAll, FindOne, and Update response types for services in consumer, partners, and POS modules.
- Added request DTOs for creating and updating goods in the consumer business activities module.
- Introduced filtering DTO for partner licenses.
- Enhanced response mapping for partner license activations.
2026-04-27 10:45:39 +03:30

39 lines
1.6 KiB
TypeScript

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'
import type { PartnerAccountChargeTransactionServiceCreateResponseDto, PartnerAccountChargeTransactionServiceFindAllResponseDto, PartnerAccountChargeTransactionServiceFindOneResponseDto } from './dto/chargeAccountQuotaTransactions-response.dto'
@ApiTags('Admin Partner Account Charge')
@Controller('admin/partners/:partnerId/charge-account-transactions')
export class PartnerAccountChargeTransactionController {
constructor(private readonly service: PartnerAccountChargeTransactionService) {}
@Get()
async findAll(@Param('partnerId') partnerId: string): Promise<PartnerAccountChargeTransactionServiceFindAllResponseDto> {
return this.service.findAll(partnerId)
}
@Get(':id')
async findOne(@Param('partnerId') partnerId: string, @Param('id') id: string): Promise<PartnerAccountChargeTransactionServiceFindOneResponseDto> {
return this.service.findOne(partnerId, id)
}
@Post()
async create(
@Param('partnerId') partnerId: string,
@Body() data: ChargeAccountQuotaDto,
): Promise<PartnerAccountChargeTransactionServiceCreateResponseDto> {
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)
// }
}