Skip to content

Commit

Permalink
ar(fix) session req
Browse files Browse the repository at this point in the history
  • Loading branch information
angeloreale committed Aug 31, 2024
1 parent a8ee2d2 commit a9f9ba4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/auth/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const GetSession = async ({ cookies = '' }) => {
'Content-Type': 'application/json',
Cookie: cookies,
},
next: { revalidate: 0 },
});
const session = await response.json();
return session;
Expand Down
2 changes: 2 additions & 0 deletions src/app/api/v1/auth/[...nextauth]/route.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// [...nextauth].ts// auth.ts TS-Doc?
import { handlers } from '@auth';
export const fetchCache = 'force-no-store';
export const revalidate = 0;
export const dynamic = 'force-dynamic';
export const { GET, POST } = handlers;
2 changes: 1 addition & 1 deletion src/app/api/v1/user/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const generateErrorResponse = (e: any, status: number) => {
};
};

export const dynamic = 'force-dynamic';
// export const dynamic = 'force-dynamic';

export async function POST(request: CombineRequest) {
const response = { error: generateErrorResponse({ message: 'Code 000/0: Non-identified error.' }, 500) };
Expand Down

0 comments on commit a9f9ba4

Please sign in to comment.