Files
psp_api/src/modules/admin/consumers/licenses/licenses.controller.ts
T

31 lines
929 B
TypeScript
Raw Normal View History

import { Body, Controller, Get, Param, Post } from '@nestjs/common'
2026-04-06 13:31:40 +03:30
import { ApiTags } from '@nestjs/swagger'
import { CreateLicenseDto } from './dto/license.dto'
2026-04-06 13:31:40 +03:30
import { LicensesService } from './licenses.service'
@ApiTags('AdminConsumerAccounts')
@Controller('admin/consumers/:consumerId/licenses')
export class LicensesController {
constructor(private readonly service: LicensesService) {}
@Get()
async findAll(@Param('consumerId') consumerId: string) {
return this.service.findAll(consumerId)
}
2026-04-06 13:31:40 +03:30
@Post()
async create(@Param('consumerId') consumerId: string, @Body() data: CreateLicenseDto) {
return this.service.create(consumerId, data)
}
// @Patch(':id')
// async update(@Param('id') id: string, @Body() data: UpdateLicenseDto) {
// return this.service.update(id, data)
// }
2026-04-06 13:31:40 +03:30
// @Delete(':id')
// async delete(@Param('id') id: string) {
// return this.service.delete(id)
// }
}