2026-04-16 22:19:20 +03:30
|
|
|
import { Body, Controller, Get, Param, Post } from '@nestjs/common'
|
2026-04-06 13:31:40 +03:30
|
|
|
import { ApiTags } from '@nestjs/swagger'
|
2026-04-16 22:19:20 +03:30
|
|
|
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) {}
|
|
|
|
|
|
2026-04-16 22:19:20 +03:30
|
|
|
@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)
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-16 22:19:20 +03:30
|
|
|
// @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)
|
|
|
|
|
// }
|
|
|
|
|
}
|