import { TokenAccount } from '@/common/decorators/tokenInfo.decorator' import { Body, Controller, Get, Param, Patch } from '@nestjs/common' import { ApiTags } from '@nestjs/swagger' import { AccountsService } from './accounts.service' import { UpdateAccountDto } from './dto/account.dto' @ApiTags('ConsumerAccounts') @Controller('consumer/accounts') export class AccountsController { constructor(private readonly accountsService: AccountsService) {} @Get() async findAll(@TokenAccount('userId') consumerId: string) { return this.accountsService.findAll(consumerId) } @Get(':id') async findOne(@Param('id') id: string) { return this.accountsService.findOne(id) } // @Post() // async create( // @TokenAccount('userId') 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) // } }