Fix random error on init

This commit is contained in:
Troplo 2021-04-10 18:25:52 +10:00
parent 40f5898cd0
commit 93142a1ab2
2 changed files with 43 additions and 51 deletions

View file

@ -642,13 +642,6 @@ export default {
this.settings.general.description.value = res.data.description; this.settings.general.description.value = res.data.description;
this.loading = false; this.loading = false;
}) })
.catch(() => {
this.$buefy.snackbar.open({
message: this.$t("errors.authFail"),
type: "is-warning",
});
this.loading = false;
});
}, },
}, },
mounted() { mounted() {
@ -673,6 +666,7 @@ export default {
type: "is-info", type: "is-info",
}); });
}); });
this.$nextTick(() => {
this.axios this.axios
.get( .get(
process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_ENDPOINT +
@ -694,13 +688,10 @@ export default {
this.loading = false; this.loading = false;
}) })
.catch(() => { .catch(() => {
this.$buefy.snackbar.open({
message: this.$t("errors.authFail"),
type: "is-warning",
});
this.loading = false; this.loading = false;
console.log(this.getBannerId()); console.log(this.getBannerId());
}); });
})
this.$nextTick(() => { this.$nextTick(() => {
this.dailyReward(false); this.dailyReward(false);
this.showUpdate(); this.showUpdate();

View file

@ -188,9 +188,7 @@ export default {
} }
}); });
}, },
}, getBlog() {
mounted() {
if (this.$store.state.user.username) {
this.axios this.axios
.get( .get(
process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_ENDPOINT +
@ -204,8 +202,11 @@ export default {
.catch((e) => { .catch((e) => {
AjaxErrorHandler(this.$store)(e); AjaxErrorHandler(this.$store)(e);
}); });
this.getWall(true);
} }
}, },
mounted() {
this.getBlog()
this.getWall(true);
},
}; };
</script> </script>