Skip to content

Commit

Permalink
fix(auth): define middleware in /logout route
Browse files Browse the repository at this point in the history
  • Loading branch information
wale committed Mar 25, 2024
1 parent ab151b5 commit 2289661
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions middleware/auth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { storeToRefs } from "pinia";

import { useAuthStore } from "~/store/auth";

export default defineNuxtRouteMiddleware((to) => {
Expand Down
4 changes: 4 additions & 0 deletions pages/logout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,8 @@ const logout = async () => {
const cancelLogout = async () => {
await router.push("/");
};
definePageMeta({
middleware: ["auth"],
});
</script>

0 comments on commit 2289661

Please sign in to comment.