From 7afb27885131753c32dc49eb455e87e86243906e Mon Sep 17 00:00:00 2001 From: xXpuma99Xx <51341582+xXpuma99Xx@users.noreply.github.com> Date: Thu, 23 Jun 2022 22:32:54 -0500 Subject: [PATCH] modulo carrera programa final --- src/carrera-programa/carrera-programa.service.ts | 6 ++++-- src/carrera-programa/dto/output/carrera-programa.dto.ts | 2 +- src/carrera-programa/entity/carrera-programa.entity.ts | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/carrera-programa/carrera-programa.service.ts b/src/carrera-programa/carrera-programa.service.ts index 387e722..88120d3 100644 --- a/src/carrera-programa/carrera-programa.service.ts +++ b/src/carrera-programa/carrera-programa.service.ts @@ -33,7 +33,7 @@ export class CarreraProgramaService { .then((existeCarretaPrograma) => { if (existeCarretaPrograma) throw new ConflictException( - 'Ya existe una relación entre esta carrera y este programa, intente con uno diferente.', + 'Los alumnos de esta carrera ya tienen acceso a este programa.', ); return this.repository.save( this.repository.create({ @@ -42,7 +42,9 @@ export class CarreraProgramaService { }), ); }) - .then((_) => ({ message: 'Se creó correctamente la carrera programa.' })); + .then((_) => ({ + message: 'Se asignó correctamente el programa a la carrera.', + })); } findById(id_carrera_programa: number) { diff --git a/src/carrera-programa/dto/output/carrera-programa.dto.ts b/src/carrera-programa/dto/output/carrera-programa.dto.ts index ac92ee9..a9927e0 100644 --- a/src/carrera-programa/dto/output/carrera-programa.dto.ts +++ b/src/carrera-programa/dto/output/carrera-programa.dto.ts @@ -1,6 +1,6 @@ import { Expose, Type } from 'class-transformer'; -import { ProgramaOutputDto } from '../../../institucion-programa/dto/output/programa.dto'; import { InstitucionCarreaOutputDto } from '../../../institucion-carrera/dto/output/institucion-carrera.dto'; +import { ProgramaOutputDto } from '../../../institucion-programa/dto/output/programa.dto'; export class CarreraProgramaOutputDto { @Expose() diff --git a/src/carrera-programa/entity/carrera-programa.entity.ts b/src/carrera-programa/entity/carrera-programa.entity.ts index ab3a63b..75dc30d 100644 --- a/src/carrera-programa/entity/carrera-programa.entity.ts +++ b/src/carrera-programa/entity/carrera-programa.entity.ts @@ -1,4 +1,4 @@ -import { Entity, PrimaryGeneratedColumn, ManyToOne, JoinColumn } from 'typeorm'; +import { Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'; import { InstitucionCarrera } from '../../institucion-carrera/entity/institucion-carrera.entity'; import { Programa } from '../../institucion-programa/entity/programa.entity';