return
This commit is contained in:
parent
0962373581
commit
17f2a1e768
@ -18,10 +18,10 @@ public class AppointmentController {
|
|||||||
this.appointmentService = appointmentService;
|
this.appointmentService = appointmentService;
|
||||||
}
|
}
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
public AppointmentDTO addAppointment(@RequestParam("name") String Name){
|
public AppointmentDTO addAppointment(@RequestBody AppointmentDTO appointmentDTO){
|
||||||
try
|
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)
|
catch(Exception e)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user