public async Task <IActionResult> GetById(Guid id) { try { var load = await _loadService.GetLoadByIdAsync(id, _userContext.UserId.Value); LoadDetailViewModel result = _mapper.Map <LoadDetailViewModel>(load); result.ViewOnly = await this._userProfileService.IsViewOnlyUserAsync(_userContext.UserId.Value); return(Success(result)); } catch (UnauthorizedAccessException ex) { return(Forbidden <ResponseMessage <LoadDetailViewModel> >(ex)); } }