Skip to content

Commit 2289661

Browse files
committed
fix(auth): define middleware in /logout route
1 parent ab151b5 commit 2289661

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

middleware/auth.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { storeToRefs } from "pinia";
2+
23
import { useAuthStore } from "~/store/auth";
34

45
export default defineNuxtRouteMiddleware((to) => {

pages/logout.vue

+4
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,8 @@ const logout = async () => {
5353
const cancelLogout = async () => {
5454
await router.push("/");
5555
};
56+
57+
definePageMeta({
58+
middleware: ["auth"],
59+
});
5660
</script>

0 commit comments

Comments
 (0)