public IActionResult Posts(string userId) { var currentUserId = this.userManager.GetUserId(this.User); if (userId == null) { userId = currentUserId; } var viewModel = this.profilesService.GetUserInfoWithPosts(userId); var isProfileOwner = UserProfileHelper.CheckIfProfileOwner(userId, currentUserId); viewModel.IsProfileOwner = isProfileOwner; var isFollowed = this.followsService.IsFollowed(userId, currentUserId); viewModel.IsFollowed = isFollowed; return(this.View(viewModel)); }