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() {
if (this.authenticated)
this.fetchFeed().then(videos => { this.fetchFeed().then(videos => {
this.videosStore = videos; this.videosStore = videos;
this.loadMoreVideos(); this.loadMoreVideos();
this.updateWatched(this.videos); 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";