public BlockUserServiceResult Block(string userName) { var targetUser = _accountService.GetUserByUsername(userName).GetAwaiter().GetResult(); if (targetUser == null) { throw new NotFoundException("User Not Found"); } var userId = User.GetUserId(); return(_userManagement.BlockUser(userId, targetUser.Id).GetAwaiter().GetResult()); }