Skip to content

Commit

Permalink
split private routes into one-per-line #1
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Jul 13, 2024
1 parent 3e1a6f6 commit 8f692df
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ import { NextResponse } from "next/server";
// It is manipulated before the project is compiled so it knows all the routes that are private
// according to what is defined in "_meta.json" files.
// See `package.json` and the `private-route-gen` script for context.
const privateRoutesMap: any = {"/reference_api":["user"],"/reference_api/about":["user"],"/reference_api/users":["user"],"/reference_api/mega_private":["cant_enter"],"/reference_api/mega_private/hello":["cant_enter"]};
const privateRoutesMap: any = {
"/reference_api":["user"],
"/reference_api/about":["user"],
"/reference_api/person":["user"],
"/reference_api/mega_private":["cant_enter"],
"/reference_api/mega_private/hello":["cant_enter"]
};

export default auth(async (req, ctx) => {
const currentPath = req.nextUrl.pathname;
Expand Down

0 comments on commit 8f692df

Please sign in to comment.