Skip to content

Commit 406a25c

Browse files
committed
Update middleware to use checkMany
1 parent 527db0f commit 406a25c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/middleware.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export const authorize = (options: MiddlewareOptions) => {
3434
}
3535
})
3636

37-
const hasWarrant = await vm.$warrant.hasWarrant({ op, warrants: warrantsToCheck });
38-
if (!hasWarrant) {
37+
const isAuthorized = await vm.$warrant.checkMany({ op, warrants: warrantsToCheck });
38+
if (!isAuthorized) {
3939
next({ path: redirectTo });
4040
} else {
4141
next();

0 commit comments

Comments
 (0)