fixed foreign key
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
import { Controller, Get, Post, Body, Param } from '@nestjs/common';
|
||||
import { AlumnoService } from './student.service';
|
||||
import { CreateStudentDto } from './dto/create-student.dto';
|
||||
import { Student } from './entities/student.entity';
|
||||
import { Alumno } from './entities/student.entity';
|
||||
|
||||
@Controller('student')
|
||||
export class StudentController {
|
||||
constructor(private readonly alumnoService: AlumnoService) {}
|
||||
|
||||
@Post()
|
||||
async create(@Body() createStudentDto: CreateStudentDto): Promise<Student> {
|
||||
async create(@Body() createStudentDto: CreateStudentDto): Promise<Alumno> {
|
||||
return this.alumnoService.create(createStudentDto);
|
||||
}
|
||||
|
||||
@Get()
|
||||
async findAll(): Promise<Student[]> {
|
||||
async findAll(): Promise<Alumno[]> {
|
||||
return this.alumnoService.findAll();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user