Skip to content

Commit

Permalink
Merge pull request #71 from teguhbayu/master
Browse files Browse the repository at this point in the history
fix build problem
  • Loading branch information
teguhbayu authored May 19, 2024
2 parents cb6b901 + f8418b1 commit 062e74c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 36 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/node.js.yml

This file was deleted.

2 changes: 1 addition & 1 deletion src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default withAuth(function middleware(req) {}, {
const pathname = req.nextUrl.pathname;
const unauthorizedConditions =
(pathname.startsWith("/admin") && token?.role !== "ADMIN") ||
(pathname.startsWith("/juri") && token?.role !== "JURI");
(pathname.startsWith("/dashboard") && token?.role !== "USER");

// Return true if there is no unauthorized conditions met
return !unauthorizedConditions;
Expand Down

0 comments on commit 062e74c

Please sign in to comment.