예제 #1
0
        public ActionResult <VideoDetailsVM> Get(int request_id)
        {
            try
            {
                var          curUser = accountUtil.GetCurrentUser(User);
                VideoRequest model   = VideoRequestService.GetSinglePublished(request_id, curUser.ID);
                if (model == null)
                {
                    throw new Exception("Видео не найдено");
                }

                VideoDetailsVM modelVM = new VideoDetailsVM(model);
                return(modelVM);
            }
            catch (Exception ex)
            {
                return(CustomBadRequest(ex));
            }
        }