Skip to content

Commit

Permalink
Merge pull request #102 from manchenkoff/drop-deprecated-page-meta
Browse files Browse the repository at this point in the history
feat!: dropped support for excludeFromSanctum page meta
  • Loading branch information
manchenkoff authored Jun 8, 2024
2 parents 0179dd6 + 5d09e71 commit 72eb181
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
8 changes: 0 additions & 8 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ type DeepPartial<T> = {

declare module '#app' {
interface PageMeta {
/**
* @deprecated Use `sanctum.excluded` instead.
*/
excludeFromSanctum?: boolean;
/**
* Sanctum global middleware page configuration.
*/
Expand Down Expand Up @@ -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.
*/
Expand Down
5 changes: 1 addition & 4 deletions src/runtime/middleware/sanctum.global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 72eb181

Please sign in to comment.