import {
  Controller,
  Get,
  Post,
  Body,
  Patch,
  Param,
  Delete,
} from "@nestjs/common";
import { KlinikaService } from "./klinika.service";
import { CreateKlinikaDto } from "./dto/create-klinika.dto";
import { UpdateKlinikaDto } from "./dto/update-klinika.dto";

@Controller("klinika")
export class KlinikaController {
  constructor(private readonly klinikaService: KlinikaService) {}

  @Post()
  create(@Body() createKlinikaDto: CreateKlinikaDto) {
    return this.klinikaService.create(createKlinikaDto);
  }

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

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

  @Patch(":id")
  update(@Param("id") id: string, @Body() updateKlinikaDto: UpdateKlinikaDto) {
    return this.klinikaService.update(+id, updateKlinikaDto);
  }

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