modulo carrera programa final
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user