This commit is contained in:
DozorovaA.A 2023-05-16 12:44:18 +04:00
parent 0962373581
commit 17f2a1e768

View File

@ -18,10 +18,10 @@ public class AppointmentController {
this.appointmentService = appointmentService;
}
@PostMapping("/add")
public AppointmentDTO addAppointment(@RequestParam("name") String Name){
public AppointmentDTO addAppointment(@RequestBody AppointmentDTO appointmentDTO){
try
{
return new AppointmentDTO(appointmentService.addAppointment(new AppointmentDTO(new Appointment(Name))));
return new AppointmentDTO(appointmentService.addAppointment(new AppointmentDTO(new Appointment(appointmentDTO.getName()))));
}
catch(Exception e)