Feature: User auth #15

Merged
scott merged 29 commits from scott/kalkutago:feature/user-auth into main 2023-08-27 12:00:57 +00:00
Showing only changes of commit 003383e455 - Show all commits

View file

@ -2,11 +2,12 @@
import { RouterLink } from 'vue-router';
import { error } from '../error'
import router from "../router";
import { state } from '../state'
async function logOut() {
const result = await fetch('/api/v1/auth', {method: 'DELETE'})
if(!result.ok) return error('failed to log out')
console.debug('logged out')
state.user = undefined
router.push('/login')
}
</script>