update librerias
This commit is contained in:
@@ -39,7 +39,7 @@ export class ModuloService {
|
||||
: id_institucion;
|
||||
|
||||
return this.repository
|
||||
.findOne({ institucion, modulo })
|
||||
.findOne({ where: { institucion, modulo } })
|
||||
.then((existeModulo) => {
|
||||
if (existeModulo)
|
||||
throw new ConflictException(
|
||||
@@ -69,7 +69,7 @@ export class ModuloService {
|
||||
}
|
||||
|
||||
findById(id_modulo: number) {
|
||||
return this.repository.findOne({ id_modulo }).then((modulo) => {
|
||||
return this.repository.findOne({ where: { id_modulo } }).then((modulo) => {
|
||||
if (!modulo) throw new NotFoundException('No existe este id módulo.');
|
||||
return modulo;
|
||||
});
|
||||
@@ -85,11 +85,13 @@ export class ModuloService {
|
||||
? await this.institucionService.findById(id_institucion)
|
||||
: id_institucion;
|
||||
|
||||
return this.repository.findOne({ institucion, modulo }).then((modulo) => {
|
||||
if (validarNoExiste && !modulo)
|
||||
throw new ConflictException('No existe este módulo.');
|
||||
return modulo;
|
||||
});
|
||||
return this.repository
|
||||
.findOne({ where: { institucion, modulo } })
|
||||
.then((modulo) => {
|
||||
if (validarNoExiste && !modulo)
|
||||
throw new ConflictException('No existe este módulo.');
|
||||
return modulo;
|
||||
});
|
||||
}
|
||||
|
||||
update(admin: Operador, attrs: Partial<Modulo>) {
|
||||
|
||||
Reference in New Issue
Block a user