import { Controller, Get, Post, Put, Body, Param, UseGuards } from '@nestjs/common'; import { ApiTags, ApiBearerAuth } from '@nestjs/swagger'; import { JwtAuthGuard } from '../auth/guards/jwt-auth.guard'; import { InvestmentsService } from './investments.service'; @ApiTags('investments') @Controller('investment-accounts') @ApiBearerAuth() @UseGuards(JwtAuthGuard) export class InvestmentsController { constructor(private service: InvestmentsService) {} @Get() findAll() { return this.service.findAll(); } @Get(':id') findOne(@Param('id') id: string) { return this.service.findOne(id); } @Post() create(@Body() dto: any) { return this.service.create(dto); } @Put(':id') update(@Param('id') id: string, @Body() dto: any) { return this.service.update(id, dto); } }