2025-09-10 17:32:00 -06:00
|
|
|
import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
|
|
|
|
|
import { ServicioService } from './servicio.service';
|
|
|
|
|
import { CreateServicioDto } from './dto/create-servicio.dto';
|
|
|
|
|
import { UpdateServicioDto } from './dto/update-servicio.dto';
|
|
|
|
|
|
|
|
|
|
@Controller('servicio')
|
|
|
|
|
export class ServicioController {
|
|
|
|
|
constructor(private readonly servicioService: ServicioService) {}
|
|
|
|
|
|
|
|
|
|
@Post()
|
|
|
|
|
create(@Body() createServicioDto: CreateServicioDto) {
|
|
|
|
|
return this.servicioService.create(createServicioDto);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Get()
|
|
|
|
|
findAll() {
|
|
|
|
|
return this.servicioService.findAll();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Get(':id')
|
|
|
|
|
findOne(@Param('id') id: string) {
|
|
|
|
|
return this.servicioService.findOne(+id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Patch(':id')
|
|
|
|
|
update(@Param('id') id: string, @Body() updateServicioDto: UpdateServicioDto) {
|
|
|
|
|
return this.servicioService.update(+id, updateServicioDto);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Delete(':id')
|
|
|
|
|
remove(@Param('id') id: string) {
|
|
|
|
|
return this.servicioService.remove(+id);
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-09-12 20:41:51 -06:00
|
|
|
//IO
|