public IActionResult NewsFeed(User user) { if (HttpContext.Session.GetInt32("Id") == null) { return(RedirectToAction("Login", "Account")); } else { Post post = new Post(); user.Id = (int)HttpContext.Session.GetInt32("Id"); HomeViewModel homeViewModel = new HomeViewModel(); //TODO: Haalt niet de juiste comments bij de juiste posts op. homeViewModel.Comments = new List <Comment>(); homeViewModel.Comments.AddRange(_commentLogic.GetComment(user)); homeViewModel.Posts = new List <Post>(); homeViewModel.Posts.AddRange(_postLogic.GetFollowingPosts(user)); return(View(homeViewModel)); } }