Don't refresh projects if no user is logged in.

Avoids a 403.
This commit is contained in:
D. Berge
2025-07-25 10:43:08 +02:00
parent 6cf6fe29f4
commit 3a0f720f2f

View File

@@ -54,7 +54,7 @@ export default {
computed: { computed: {
snackText () { return this.$store.state.snack.snackText }, snackText () { return this.$store.state.snack.snackText },
snackColour () { return this.$store.state.snack.snackColour }, snackColour () { return this.$store.state.snack.snackColour },
...mapGetters(["serverEvent"]) ...mapGetters(["user", "serverEvent"])
}, },
watch: { watch: {
@@ -96,8 +96,10 @@ export default {
// Local Storage values are always strings // Local Storage values are always strings
this.$vuetify.theme.dark = localStorage.getItem("darkTheme") == "true"; this.$vuetify.theme.dark = localStorage.getItem("darkTheme") == "true";
await this.setCredentials(); await this.setCredentials();
if (this.user) {
this.refreshProjects(); this.refreshProjects();
} }
}
}; };
</script> </script>