find by ubication

This commit is contained in:
2026-01-27 18:33:43 -06:00
parent fd721737e5
commit d322b39aeb
2 changed files with 3 additions and 3 deletions
@@ -13,7 +13,7 @@ export class ProgramaEquipoController {
@Get(':id') @Get(':id')
findOne(@Param('id') id: string) { findOne(@Param('id') id: string) {
return this.programaEquipoService.findOne(+id); return this.programaEquipoService.findOne(id);
} }
@Patch(':id') @Patch(':id')
@@ -16,9 +16,9 @@ export class ProgramaEquipoService {
return this.ProgramaEquipoRepository.find({ where: { id_equipo } }); return this.ProgramaEquipoRepository.find({ where: { id_equipo } });
} }
async findOne(id_equipo: number) { async findOne(ubicacion: string) {
const equipo = await this.ProgramaEquipoRepository.find({ const equipo = await this.ProgramaEquipoRepository.find({
where: { id_equipo }, where: { equipo:{ubicacion} },
}); });
if (equipo.length === 0) { if (equipo.length === 0) {