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

29 lines
939 B
TypeScript
Raw Normal View History

import { Controller, Get, Param } from '@nestjs/common'
import { AdminConsumersService } from './consumers.service'
import type { AdminConsumersServiceFindAllResponseDto, AdminConsumersServiceFindOneResponseDto } from './dto/consumers-response.dto'
2026-03-16 00:33:40 +03:30
@Controller('admin/consumers')
export class AdminUsersController {
constructor(private readonly usersService: AdminConsumersService) {}
2026-03-16 00:33:40 +03:30
@Get()
async findAll(): Promise<AdminConsumersServiceFindAllResponseDto> {
2026-03-16 00:33:40 +03:30
return this.usersService.findAll()
}
@Get(':id')
async findOne(@Param('id') id: string): Promise<AdminConsumersServiceFindOneResponseDto> {
2026-03-16 00:33:40 +03:30
return this.usersService.findOne(id)
}
// @Post()
// async create(@Body() data: CreateConsumerDto) {
// return this.usersService.create(data)
// }
2026-03-16 00:33:40 +03:30
// @Patch(':id')
// async update(@Param('id') id: string, @Body() data: UpdateConsumerDto) {
// return this.usersService.update(id, data)
// }
2026-03-16 00:33:40 +03:30
}