added modified programs
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Controller, Get, Body, Patch, Param } from '@nestjs/common';
|
||||
import { ProgramaEquipoService } from './programa_equipo.service';
|
||||
import { UpdateProgramaEquipoDto } from './dto/update-programa_equipo.dto';
|
||||
import { UpdateProgramaEquipoDto, UpdateProgramasSalaDto } from './dto/update-programa_equipo.dto';
|
||||
|
||||
@Controller('programa-equipo')
|
||||
export class ProgramaEquipoController {
|
||||
@@ -11,16 +11,29 @@ export class ProgramaEquipoController {
|
||||
return this.programaEquipoService.findAllProgramByNumber(+id);
|
||||
}
|
||||
|
||||
@Get('ubicacion/:id')
|
||||
findAllProgramByUbicacion(@Param('id') id: string) {
|
||||
return this.programaEquipoService.findAllProgramByUbication(id);
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
findOne(@Param('id') id: string) {
|
||||
return this.programaEquipoService.findOne(id);
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
update(
|
||||
@Patch('equipo/:id')
|
||||
updateMachine(
|
||||
@Param('id') id: string,
|
||||
@Body() updateProgramaEquipoDto: UpdateProgramaEquipoDto,
|
||||
) {
|
||||
return this.programaEquipoService.update(+id, updateProgramaEquipoDto);
|
||||
return this.programaEquipoService.updateMachine(
|
||||
Number(id),
|
||||
updateProgramaEquipoDto.programas,
|
||||
);
|
||||
}
|
||||
|
||||
@Patch('sala')
|
||||
updateBySala(@Body() dto: UpdateProgramasSalaDto) {
|
||||
return this.programaEquipoService.updateBySala(dto.sala, dto.programas);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user