From f07cb822aa6187a8ec58c7d6fc4493c3ca1b308d Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Tue, 19 Jul 2022 09:37:26 +0530 Subject: [PATCH] feed: take user to login page if not logged in --- src/components/FeedPage.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/FeedPage.vue b/src/components/FeedPage.vue index 9b01a825..a42b9448 100644 --- a/src/components/FeedPage.vue +++ b/src/components/FeedPage.vue @@ -45,11 +45,13 @@ export default { }, }, mounted() { - this.fetchFeed().then(videos => { - this.videosStore = videos; - this.loadMoreVideos(); - this.updateWatched(this.videos); - }); + if (this.authenticated) + this.fetchFeed().then(videos => { + this.videosStore = videos; + this.loadMoreVideos(); + this.updateWatched(this.videos); + }); + else this.$router.push("/login"); }, activated() { document.title = this.$t("titles.feed") + " - Piped";