public List <Post> GetFollowingUserPosts(int FollowingUserId)
        {
            List <Post> result = new List <Post>();

            _userFollowManager.GetUserFollowing(FollowingUserId).ForEach(x => result.AddRange(x.Posts));
            return(result);
        }
Exemple #2
0
 public IActionResult GetFollowings()
 {
     try
     {
         var user = _userManager.GetUserAsync(User).Result;
         return(Ok(_userFollowManager.GetUserFollowing(user.Id).Select(x => new UserDto {
             Email = x.Email, Name = x.Name, Surname = x.Surname, Username = x.UserName
         })));
     }
     catch (Exception)
     {
         NotFound();
     }
     return(BadRequest());
 }