public IActionResult CancelAppointment(int appointmentId) { DoctorAppointment appointment = regularAppointmentService.CancelAppointment(appointmentId); if (appointment == null) { return(BadRequest()); } return(Ok(ViewAppointmentAdapter.AppointmentToViewAppointmenDto(appointment))); }
public IActionResult Post(DoctorAppointment appointment) { DoctorAppointment doctorAppointment = regularAppointmentService.CreateRegular(appointment); if (doctorAppointment == null) { return(BadRequest()); } return(Ok(ViewAppointmentAdapter.AppointmentToViewAppointmenDto(doctorAppointment))); }