From 9c4e674f2a80ff90d068d4b3e3525db74d13f34b Mon Sep 17 00:00:00 2001 From: Pratyush Date: Sat, 16 Mar 2024 19:27:32 +0530 Subject: [PATCH] middlewareRemoved --- middleware.js | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 middleware.js diff --git a/middleware.js b/middleware.js deleted file mode 100644 index 06c32ca..0000000 --- a/middleware.js +++ /dev/null @@ -1,41 +0,0 @@ -// import { getToken } from "next-auth/jwt"; -// import { withAuth } from "next-auth/middleware"; -// import { getTokenDetails } from "./utils/authuser"; - -// export default withAuth( -// async function middleware(req) { - -// if (req.nextUrl.pathname.startsWith('/events/event1')) { - -// // const token = await getToken({req}); -// // const auth = token ? token.accessTokenFromBackend : null; - -// // console.log('authtthhhhh', auth) -// // // // let userId = await getTokenDetails(auth); - -// // const res = await fetch(`${process.env.NEXTAUTH_URL}/api/userDetails`, { -// // content: 'application/json', -// // method: 'GET', -// // headers: { -// // 'Content-Type': 'application/json', -// // Authorization: `Bearer ${auth}`, -// // 'Access-Control-Allow-Origin': '*', -// // }, -// // }) - -// // const data = await res.json(); -// // console.log('data', data) - -// // return NextResponse.rewrite(new URL('/about-2', request.url)) -// } - -// // console.log('userId', userId); -// } -// ) - -// // export function middleware(request) { -// // if (request.nextUrl.pathname.startsWith('/events/event1')) { -// // console.log('asdf') -// // // return NextResponse.rewrite(new URL('/about-2', request.url)) -// // } -// // } \ No newline at end of file