Allowing auth to be disabled in config.

This commit is contained in:
DebaucheryLibrarian
2021-03-16 04:12:05 +01:00
parent 1703e9a541
commit 0d7a03f3e5
7 changed files with 36 additions and 3 deletions

View File

@@ -64,6 +64,12 @@ async function login() {
}
}
function mounted() {
if (!this.$store.state.auth.enabled) {
this.$router.replace({ name: 'not-found' });
}
}
export default {
data() {
return {
@@ -73,6 +79,7 @@ export default {
error: null,
};
},
mounted,
methods: {
login,
},

View File

@@ -73,6 +73,12 @@ async function signup() {
}
}
function mounted() {
if (!this.$store.state.auth.enabled) {
this.$router.replace({ name: 'not-found' });
}
}
export default {
data() {
return {
@@ -83,6 +89,7 @@ export default {
error: null,
};
},
mounted,
methods: {
signup,
},