import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { DiagnozaService } from './diagnoza.service';
import { CreateDiagnozaDto } from './dto/create-diagnoza.dto';
import { UpdateDiagnozaDto } from './dto/update-diagnoza.dto';

@Controller('diagnoza')
export class DiagnozaController {
  constructor(private readonly diagnozaService: DiagnozaService) {}

  @Post()
  create(@Body() createDiagnozaDto: CreateDiagnozaDto) {
    return this.diagnozaService.create(createDiagnozaDto);
  }

  @Get()
  findAll() {
    return this.diagnozaService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.diagnozaService.findOne(+id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateDiagnozaDto: UpdateDiagnozaDto) {
    return this.diagnozaService.update(+id, updateDiagnozaDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.diagnozaService.remove(+id);
  }
}
