Exemplo n.º 1
0
        public async Task <UserData> GetUserById(string userId)
        {
            var res = await _userStatusRepository.GetUsersStatuses();

            var userStatus = res.FirstOrDefault(u => u.UserId == userId);

            if (userStatus == null)
            {
                return(null);
            }
            return(new UserData()
            {
                Id = userStatus.UserId,
                IsOnline = userStatus.IsOnline,
                LastChanged = userStatus.UpdateDateTime
            });
        }