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 { AssessmentGroupsService } from './assessment-groups.service'; @ApiTags('assessment-groups') @Controller('assessment-groups') @ApiBearerAuth() @UseGuards(JwtAuthGuard) export class AssessmentGroupsController { constructor(private service: AssessmentGroupsService) {} @Get() findAll() { return this.service.findAll(); } @Get('summary') getSummary() { return this.service.getSummary(); } @Get('default') getDefault() { return this.service.getDefault(); } @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); } @Put(':id/set-default') setDefault(@Param('id') id: string) { return this.service.setDefault(id); } }