1
0
mirror of https://github.com/robonen/metr.git synced 2026-03-20 02:44:42 +00:00

User authentication fix

This commit is contained in:
2022-06-07 15:06:57 +07:00
committed by GitHub
parent 9e1b0b5da1
commit 4e39df490a
4 changed files with 16 additions and 4 deletions

View File

@@ -10,9 +10,6 @@
<a href="https://github.com/robonen/metr-frontend/actions">
<img src="https://github.com/robonen/metr-frontend/actions/workflows/release.yml/badge.svg" title="Release status">
</a>
<a href="https://github.com/robonen/metr-frontend/actions">
<img src="https://github.com/robonen/metr-frontend/actions/workflows/test.yml/badge.svg" title="Lint status">
</a>
<a href="https://github.com/robonen/metr-frontend/releases">
<img src="https://img.shields.io/github/v/release/robonen/metr-frontend?display_name=tag&label=Last%20Version&color=brightgreen" title="Last version">
</a>

View File

@@ -144,13 +144,17 @@ export default {
}
},
async mounted() {
if (this.$store.getters.userAuthenticated) {
this.$router.push('/profile');
return;
}
await this.addSearchParam(this.$route.query);
},
watch: {
'$route.query'(value) {
this.addSearchParam(value);
}
}
},
}
</script>

View File

@@ -150,6 +150,11 @@ export default {
}
},
async mounted() {
if (this.$store.getters.userAuthenticated) {
this.$router.push('/profile');
return;
}
const id = this.$route.params.id;
if (id === undefined)

View File

@@ -81,6 +81,12 @@ export default {
});
}
},
mounted() {
if (this.$store.getters.userAuthenticated) {
this.$router.push('/profile');
return;
}
}
}
</script>>