update librerias

This commit is contained in:
2022-08-23 17:12:09 -05:00
parent 7f7dfbe9c1
commit 2a031a7658
25 changed files with 2775 additions and 3297 deletions
+9 -7
View File
@@ -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>) {