From 682795ee228c01f266e50dbe9b639a4cbe95efed Mon Sep 17 00:00:00 2001 From: Alma Date: Sat, 12 Apr 2025 15:18:27 +0200 Subject: [PATCH] working leantime widget 51 --- app/api/leantime/tasks/route.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/leantime/tasks/route.ts b/app/api/leantime/tasks/route.ts index 23c425bc..c9209578 100644 --- a/app/api/leantime/tasks/route.ts +++ b/app/api/leantime/tasks/route.ts @@ -26,7 +26,7 @@ async function getLeantimeUserId(email: string): Promise { const headers: Record = { 'Content-Type': 'application/json', - 'apiKey': process.env.LEANTIME_TOKEN + 'X-API-Key': process.env.LEANTIME_TOKEN }; const response = await fetch(`${process.env.LEANTIME_API_URL}/api/jsonrpc`, { @@ -100,7 +100,7 @@ export async function GET(request: NextRequest) { console.log('Fetching tasks for Leantime user ID:', userId); const headers: Record = { 'Content-Type': 'application/json', - 'apiKey': process.env.LEANTIME_TOKEN! + 'X-API-Key': process.env.LEANTIME_TOKEN! }; const response = await fetch(`${process.env.LEANTIME_API_URL}/api/jsonrpc`, {