2024-06-14 14:33:27 -06:00
|
|
|
import { Body, Controller, Delete, Get, Post } from '@nestjs/common';
|
|
|
|
|
import { ProfesorService } from './profesor.service';
|
2024-06-14 15:33:11 -06:00
|
|
|
import { profesorDto } from './dto/profesorDto.dto';
|
2024-06-14 14:33:27 -06:00
|
|
|
|
|
|
|
|
@Controller('profesor')
|
|
|
|
|
export class profesorController {
|
|
|
|
|
constructor(private profesorService: ProfesorService) {}
|
|
|
|
|
|
|
|
|
|
@Post("alta")
|
2024-06-14 15:33:11 -06:00
|
|
|
async postRegister(@Body() data:profesorDto){
|
2024-06-14 14:33:27 -06:00
|
|
|
return this.profesorService.register(data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Post("midificacion")
|
2024-06-14 15:33:11 -06:00
|
|
|
async postModify(@Body() data:profesorDto){
|
|
|
|
|
return this.profesorService.modify();
|
2024-06-14 14:33:27 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Delete("borrado")
|
2024-06-14 15:33:11 -06:00
|
|
|
async remove(@Body() data:profesorDto){
|
|
|
|
|
return this.profesorService.remove();
|
2024-06-14 14:33:27 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Get("profile")
|
|
|
|
|
async profile(){
|
|
|
|
|
return this.profesorService.profile();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Get("profile/filter")
|
2024-06-14 15:33:11 -06:00
|
|
|
async filter(@Body() data:profesorDto){
|
|
|
|
|
return this.profesorService.filter();
|
2024-06-14 14:33:27 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|