refactor user accounts structure

This commit is contained in:
2026-03-16 00:33:40 +03:30
parent d2215b9f04
commit 0ad6a3200e
118 changed files with 18774 additions and 8764 deletions
@@ -0,0 +1,33 @@
import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common'
import { AdminUsersService } from './consumers.service'
import { CreateConsumerDto, UpdateConsumerDto } from './dto/consumer.dto'
@Controller('admin/consumers')
export class AdminUsersController {
constructor(private readonly usersService: AdminUsersService) {}
@Get()
async findAll() {
return this.usersService.findAll()
}
@Get(':id')
async findOne(@Param('id') id: string) {
return this.usersService.findOne(id)
}
@Post()
async create(@Body() data: CreateConsumerDto) {
return this.usersService.create(data)
}
@Patch(':id')
async update(@Param('id') id: string, @Body() data: UpdateConsumerDto) {
return this.usersService.update(id, data)
}
@Delete(':id')
async delete(@Param('id') id: string) {
return this.usersService.delete(id)
}
}