public IActionResult LikePost(int PostId) { User user = new User(); user.Id = (int)HttpContext.Session.GetInt32("Id"); Post post = new Post(); post.PostId = PostId; _postLogic.LikePost(post, user); return(RedirectToAction("NewsFeed", "Home")); }
public IActionResult LikePost(int PostId, int RecieverId) { User user = new User(); user.Id = (int)HttpContext.Session.GetInt32("Id"); Post post = new Post(); post.PostId = PostId; _postLogic.LikePost(post, user); return(RedirectToAction("SearchedProfile/" + RecieverId, "Profile")); }