From 1aaf349d3de568d8ef5fc46b4cb3ac8524dbb430 Mon Sep 17 00:00:00 2001 From: NotII <46204250+NotII@users.noreply.github.com> Date: Mon, 24 Mar 2025 00:52:02 +0000 Subject: [PATCH] fix --- lib/server-service.ts | 2 +- tsconfig.json | 24 +++++++++++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/lib/server-service.ts b/lib/server-service.ts index 0560b86..fc9fe5b 100644 --- a/lib/server-service.ts +++ b/lib/server-service.ts @@ -12,7 +12,7 @@ export async function fetchServer( options: RequestInit = {} ): Promise { // Get auth token from cookies - const cookieStore = cookies(); + const cookieStore = await cookies(); const authToken = cookieStore.get('Authorization')?.value; // Redirect to login if not authenticated diff --git a/tsconfig.json b/tsconfig.json index e7ff90f..d81d4ee 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,10 @@ { "compilerOptions": { - "lib": ["dom", "dom.iterable", "esnext"], + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], "allowJs": true, "skipLibCheck": true, "strict": true, @@ -18,9 +22,19 @@ } ], "paths": { - "@/*": ["./*"] - } + "@/*": [ + "./*" + ] + }, + "target": "ES2017" }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + ".next/types/**/*.ts" + ], + "exclude": [ + "node_modules" + ] }