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
@@ -22,7 +22,7 @@ export class InstitucionProgramaService {
create(programa: string) {
return this.programaRepository
.findOne({ programa })
.findOne({ where: { programa } })
.then((existePrograma) => {
if (existePrograma)
throw new ConflictException('Ya existe este programa.');
@@ -85,18 +85,22 @@ export class InstitucionProgramaService {
}
findProgramaById(id_programa: number) {
return this.programaRepository.findOne({ id_programa }).then((programa) => {
if (!programa) throw new NotFoundException('No existe este programa.');
return programa;
});
return this.programaRepository
.findOne({ where: { id_programa } })
.then((programa) => {
if (!programa) throw new NotFoundException('No existe este programa.');
return programa;
});
}
findProgramaByPrograma(programa: string, validarNoExiste = true) {
return this.programaRepository.findOne({ programa }).then((programa) => {
if (validarNoExiste && !programa)
throw new NotFoundException('No existe este programa.');
return programa;
});
return this.programaRepository
.findOne({ where: { programa } })
.then((programa) => {
if (validarNoExiste && !programa)
throw new NotFoundException('No existe este programa.');
return programa;
});
}
update(admin: Operador, attrs: Partial<InstitucionPrograma>) {