equipo programa service final

This commit is contained in:
2022-12-20 07:18:37 -06:00
parent 2122ad3770
commit 584531b317
22 changed files with 94 additions and 83 deletions
@@ -21,14 +21,14 @@ export class InstitucionProgramaService {
) {}
create(programa: string) {
// Busco un programa con ese nombre
// Buscamos un programa con ese nombre
return this.programaRepository
.findOne({ where: { programa } })
.then((existePrograma) => {
// Saco error si existe
if (existePrograma)
throw new ConflictException('Ya existe este programa.');
// Creo y guardo el registro
// Creamos y guardamos el registro
return this.programaRepository.save(
this.programaRepository.create({ programa }),
);