feed: take user to login page if not logged in

This commit is contained in:
Kavin 2022-07-19 09:37:26 +05:30
parent 8e306ab311
commit f07cb822aa
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD

View file

@ -45,11 +45,13 @@ export default {
}, },
}, },
mounted() { mounted() {
this.fetchFeed().then(videos => { if (this.authenticated)
this.videosStore = videos; this.fetchFeed().then(videos => {
this.loadMoreVideos(); this.videosStore = videos;
this.updateWatched(this.videos); this.loadMoreVideos();
}); this.updateWatched(this.videos);
});
else this.$router.push("/login");
}, },
activated() { activated() {
document.title = this.$t("titles.feed") + " - Piped"; document.title = this.$t("titles.feed") + " - Piped";