fixed modified machines' programs and search programs

This commit is contained in:
2026-03-20 17:51:12 -05:00
parent 4bd78578a7
commit 645c4ed6c1
2 changed files with 5 additions and 5 deletions
@@ -13,8 +13,8 @@ export class ProgramaEquipoController {
@UseGuards(JwtAuthGuard, RolesGuard)
@Roles(Role.ADMINISTRADOR, Role.SUPER_ADMINISTRADOR)
@Get('programas/:id')
findAllProgramByNumber(@Param('id') id: number) {
return this.programaEquipoService.findAllProgramByNumber(+id);
async findAllProgramByNumber(@Param('id') id: number) {
return await this.programaEquipoService.findAllProgramByNumber(+id);
}
@UseGuards(JwtAuthGuard, RolesGuard)
@@ -28,7 +28,7 @@ export class ProgramaEquipoController {
@UseGuards(JwtAuthGuard, RolesGuard)
@Roles(Role.ADMINISTRADOR, Role.SUPER_ADMINISTRADOR)
@Get(':id')
findOne(@Param('id') id: string) {
findOne(@Param('id') id: number) {
return this.programaEquipoService.findOne(id);
}
@@ -21,9 +21,9 @@ export class ProgramaEquipoService {
return this.programaEquipoRepository.find();
}
async findOne(ubicacion: string) {
async findOne(id_equipo: number) {
const equipo = await this.programaEquipoRepository.find({
where: { equipo: { ubicacion } },
where: { equipo: { id_equipo } },
});
if (equipo.length === 0) {