From 5d09e71561d9a22c0f061252067b39fb044df04c Mon Sep 17 00:00:00 2001 From: manchenkoff Date: Sat, 8 Jun 2024 23:53:19 +0200 Subject: [PATCH] feat!: dropped support for excludeFromSanctum page meta --- src/module.ts | 8 -------- src/runtime/middleware/sanctum.global.ts | 5 +---- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/module.ts b/src/module.ts index 97fd924..6dfe5c8 100644 --- a/src/module.ts +++ b/src/module.ts @@ -20,10 +20,6 @@ type DeepPartial = { declare module '#app' { interface PageMeta { - /** - * @deprecated Use `sanctum.excluded` instead. - */ - excludeFromSanctum?: boolean; /** * Sanctum global middleware page configuration. */ @@ -116,10 +112,6 @@ declare module '@nuxt/schema' { declare module '../../node_modules/nuxt/dist/pages/runtime/composables' { interface PageMeta { - /** - * @deprecated Use \`sanctum.excluded\` instead. - */ - excludeFromSanctum?: boolean; /** * Sanctum global middleware page configuration. */ diff --git a/src/runtime/middleware/sanctum.global.ts b/src/runtime/middleware/sanctum.global.ts index 919ae39..61eae2a 100644 --- a/src/runtime/middleware/sanctum.global.ts +++ b/src/runtime/middleware/sanctum.global.ts @@ -31,10 +31,7 @@ export default defineNuxtRouteMiddleware((to) => { return; } - if ( - to.meta.excludeFromSanctum === true || - to.meta.sanctum?.excluded === true - ) { + if (to.meta.sanctum?.excluded === true) { return; }