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

View file

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