public IHttpActionResult ConfirmAppointment(AppointmentModel model) { if (!ModelState.IsValid) { return(Json(_responseProvider.GenerateBadRequestResponse(ModelState))); } try { var res = _groupManager.ConfirmAppointment(int.Parse(User.Identity.GetUserId()), model); return(Json(_responseProvider.GenerateResponse(new List <string> { res }, "ConfirmAppointment"))); } catch (Exception e) { _logProvider.Log(Tag, "ConfirmAppointment", e.Message); } return(Json(_responseProvider.GenerateUnknownErrorResponse())); }