15 lines
420 B
TypeScript
15 lines
420 B
TypeScript
import { Body, Controller, Post } from '@nestjs/common';
|
|
import { StudentService } from './student.service';
|
|
import { CreateStudentDto } from './create-student.dto';
|
|
|
|
@Controller('students')
|
|
export class StudentController {
|
|
|
|
constructor(private readonly studentService: StudentService) {}
|
|
|
|
@Post('new-user')
|
|
createNewUser(@Body() body: CreateStudentDto) {
|
|
return this.studentService.createNewUser(body);
|
|
}
|
|
|
|
} |