refactor: remove redundant admin checks from pages (now handled by router)
This commit is contained in:
@@ -10,10 +10,5 @@
|
|||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
return { authStore };
|
return { authStore };
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
if (!this.authStore.isAdmin) {
|
|
||||||
this.$router.push('/');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -10,10 +10,5 @@
|
|||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
return { authStore };
|
return { authStore };
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
if (!this.authStore.isAdmin) {
|
|
||||||
this.$router.push('/');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -10,10 +10,5 @@
|
|||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
return { authStore };
|
return { authStore };
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
if (!this.authStore.isAdmin) {
|
|
||||||
this.$router.push('/');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -141,11 +141,6 @@
|
|||||||
result: null,
|
result: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
if (!this.authStore.isAdmin) {
|
|
||||||
this.$router.push('/');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
formatItems(ids) {
|
formatItems(ids) {
|
||||||
if (!ids || ids.length === 0) return [];
|
if (!ids || ids.length === 0) return [];
|
||||||
|
|||||||
@@ -128,11 +128,6 @@
|
|||||||
result: null,
|
result: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
if (!this.authStore.isAdmin) {
|
|
||||||
this.$router.push('/');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
formatItems(ids) {
|
formatItems(ids) {
|
||||||
if (!ids || ids.length === 0) return [];
|
if (!ids || ids.length === 0) return [];
|
||||||
|
|||||||
@@ -98,11 +98,6 @@
|
|||||||
result: null,
|
result: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
if (!this.authStore.isAdmin) {
|
|
||||||
this.$router.push('/');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
formatItems(ids) {
|
formatItems(ids) {
|
||||||
if (!ids || ids.length === 0) return [];
|
if (!ids || ids.length === 0) return [];
|
||||||
|
|||||||
@@ -9,10 +9,5 @@
|
|||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
return { authStore };
|
return { authStore };
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
if (!this.authStore.isAdmin) {
|
|
||||||
this.$router.push('/');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user