This commit is contained in:
NotII
2025-03-24 00:52:02 +00:00
parent 6566b427b0
commit 1aaf349d3d
2 changed files with 20 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ export async function fetchServer<T = unknown>(
options: RequestInit = {} options: RequestInit = {}
): Promise<T> { ): Promise<T> {
// Get auth token from cookies // Get auth token from cookies
const cookieStore = cookies(); const cookieStore = await cookies();
const authToken = cookieStore.get('Authorization')?.value; const authToken = cookieStore.get('Authorization')?.value;
// Redirect to login if not authenticated // Redirect to login if not authenticated

View File

@@ -1,6 +1,10 @@
{ {
"compilerOptions": { "compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"], "lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true, "allowJs": true,
"skipLibCheck": true, "skipLibCheck": true,
"strict": true, "strict": true,
@@ -18,9 +22,19 @@
} }
], ],
"paths": { "paths": {
"@/*": ["./*"] "@/*": [
} "./*"
]
}, },
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "target": "ES2017"
"exclude": ["node_modules"] },
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
} }