diff --git a/app/api/leantime/tasks/route.ts b/app/api/leantime/tasks/route.ts index f4a9bc0d..eff2e612 100644 --- a/app/api/leantime/tasks/route.ts +++ b/app/api/leantime/tasks/route.ts @@ -21,11 +21,14 @@ async function getLeantimeUserId(email: string): Promise { } console.log('Fetching Leantime users for email:', email); + console.log('API URL:', process.env.LEANTIME_API_URL); + console.log('Token length:', process.env.LEANTIME_TOKEN.length); + const response = await fetch(`${process.env.LEANTIME_API_URL}/api/jsonrpc`, { method: 'POST', headers: { 'Content-Type': 'application/json', - 'apiKey': process.env.LEANTIME_TOKEN + 'Authorization': `Bearer ${process.env.LEANTIME_TOKEN}` }, body: JSON.stringify({ jsonrpc: '2.0', @@ -97,7 +100,7 @@ export async function GET(request: NextRequest) { method: 'POST', headers: { 'Content-Type': 'application/json', - 'apiKey': process.env.LEANTIME_TOKEN + 'Authorization': `Bearer ${process.env.LEANTIME_TOKEN}` }, body: JSON.stringify({ jsonrpc: '2.0',