From 645c4ed6c12726ce1eb5857f0228c62010ac0d9e Mon Sep 17 00:00:00 2001 From: IO <320154041@pcpuma.acatlan.unam.mx> Date: Fri, 20 Mar 2026 17:51:12 -0500 Subject: [PATCH] fixed modified machines' programs and search programs --- src/programa_equipo/programa_equipo.controller.ts | 6 +++--- src/programa_equipo/programa_equipo.service.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/programa_equipo/programa_equipo.controller.ts b/src/programa_equipo/programa_equipo.controller.ts index f7685e3..e66ea2d 100644 --- a/src/programa_equipo/programa_equipo.controller.ts +++ b/src/programa_equipo/programa_equipo.controller.ts @@ -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); } diff --git a/src/programa_equipo/programa_equipo.service.ts b/src/programa_equipo/programa_equipo.service.ts index 0141695..e257635 100644 --- a/src/programa_equipo/programa_equipo.service.ts +++ b/src/programa_equipo/programa_equipo.service.ts @@ -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) {