Пример #1
0
        public ActionResult <SuccessResponse> Update(AppointmentUpdateRequest model)
        {
            int          code     = 200;
            BaseResponse response = null;


            try
            {
                int userId = _authService.GetCurrentUserId();
                _service.Update(model, userId);
                Appointment appointmentWithEmail = _service.GetAppointmentForEmail(model.Id);
                _emailService.ConfirmAppointmentEmail(appointmentWithEmail);
                response = new SuccessResponse();
            }
            catch (Exception ex)
            {
                code     = 500;
                response = new ErrorResponse(ex.Message);
            }

            return(StatusCode(code, response));
        }