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() {
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";