fixed modified machines' programs and search programs
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user