aDD LOGout. Refactor routing to require auth on every path by default.

This commit is contained in:
2019-05-18 12:25:00 -05:00
parent 6380c73421
commit 79aa711680
6 changed files with 68 additions and 14 deletions

4
web/src/views/Logout.vue Normal file
View File

@ -0,0 +1,4 @@
<template>
</template>
<script lang="ts" src="./logout.ts"></script>
<style lang="scss" src="./logout.scss"></style>

View 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>

View File

12
web/src/views/logout.ts Normal file
View 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;