dee96b6e91
- 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.
39 lines
1.6 KiB
TypeScript
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)
|
|
// }
|
|
}
|