aDD LOGout. Refactor routing to require auth on every path by default.
This commit is contained in:
4
web/src/views/Logout.vue
Normal file
4
web/src/views/Logout.vue
Normal file
@ -0,0 +1,4 @@
|
||||
<template>
|
||||
</template>
|
||||
<script lang="ts" src="./logout.ts"></script>
|
||||
<style lang="scss" src="./logout.scss"></style>
|
14
web/src/views/NotFound.vue
Normal file
14
web/src/views/NotFound.vue
Normal file
@ -0,0 +1,14 @@
|
||||
<template>
|
||||
<div id=not-found>
|
||||
<h1>Not Found</h1>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { Component, Vue } from 'vue-property-decorator';
|
||||
|
||||
@Component({})
|
||||
export class NotFound extends Vue {
|
||||
}
|
||||
|
||||
export default NotFound;
|
||||
</script>
|
0
web/src/views/logout.scss
Normal file
0
web/src/views/logout.scss
Normal file
12
web/src/views/logout.ts
Normal file
12
web/src/views/logout.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { Component, Vue } from 'vue-property-decorator';
|
||||
import { authStore } from '@/store';
|
||||
|
||||
@Component({})
|
||||
export class Logout extends Vue {
|
||||
private mounted() {
|
||||
authStore.logout();
|
||||
this.$router.push({ name: 'login' });
|
||||
}
|
||||
}
|
||||
|
||||
export default Logout;
|
Reference in New Issue
Block a user