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,38 @@
import { Body, Controller, Get, Param, Patch, Post } from '@nestjs/common'
import { ApiTags } from '@nestjs/swagger'
import { AccountsService } from './accounts.service'
import { CreateConsumerAccountDto, UpdateAccountDto } from './dto/account.dto'
@ApiTags('ConsumerAccounts')
@Controller('admin/consumers/:consumerId/accounts')
export class AccountsController {
constructor(private readonly accountsService: AccountsService) {}
@Get()
async findAll(@Param('consumerId') consumerId: string) {
return this.accountsService.findAll(consumerId)
}
@Get(':id')
async findOne(@Param('id') id: string) {
return this.accountsService.findOne(id)
}
@Post()
async create(
@Param('consumerId') consumerId: string,
@Body() data: CreateConsumerAccountDto,
) {
return this.accountsService.create(consumerId, data)
}
@Patch(':id')
async update(@Param('id') id: string, @Body() data: UpdateAccountDto) {
return this.accountsService.update(id, data)
}
// @Delete(':id')
// async delete(@Param('id') id: string) {
// return this.accountsService.delete(id)
// }
}