find by ubication
This commit is contained in:
@@ -13,7 +13,7 @@ export class ProgramaEquipoController {
|
||||
|
||||
@Get(':id')
|
||||
findOne(@Param('id') id: string) {
|
||||
return this.programaEquipoService.findOne(+id);
|
||||
return this.programaEquipoService.findOne(id);
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
|
||||
@@ -16,9 +16,9 @@ export class ProgramaEquipoService {
|
||||
return this.ProgramaEquipoRepository.find({ where: { id_equipo } });
|
||||
}
|
||||
|
||||
async findOne(id_equipo: number) {
|
||||
async findOne(ubicacion: string) {
|
||||
const equipo = await this.ProgramaEquipoRepository.find({
|
||||
where: { id_equipo },
|
||||
where: { equipo:{ubicacion} },
|
||||
});
|
||||
|
||||
if (equipo.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user