Update various configuration files, components, and assets; enhance notification system and API endpoints; improve documentation and styles across the application.
This commit is contained in:
28
pages/logout/index.vue
Normal file
28
pages/logout/index.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<script setup>
|
||||
import { useUserStore } from "~/stores/user";
|
||||
|
||||
definePageMeta({
|
||||
title: "Logout",
|
||||
layout: "empty",
|
||||
});
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
await useFetch("/api/auth/logout", {
|
||||
method: "GET",
|
||||
});
|
||||
|
||||
if (process.client) {
|
||||
userStore.setUsername("");
|
||||
userStore.setRoles([]);
|
||||
userStore.setIsAuthenticated(false);
|
||||
|
||||
navigateTo("/login");
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<h1>Logout</h1>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user