예제 #1
0
        public async Task <UserMessageDto> GetAsync(Guid id)
        {
            var message = await _repository.GetByIdAsync(id);

            if (message.UserId != CurrentUser.GetId())
            {
                throw new UserFriendlyException(L["NoPermissons"]);
            }

            return(ObjectMapper.Map <UserMessage, UserMessageDto>(message));
        }