working leantime widget 51

This commit is contained in:
Alma 2025-04-12 15:18:27 +02:00
parent 7285e45781
commit 682795ee22

View File

@ -26,7 +26,7 @@ async function getLeantimeUserId(email: string): Promise<number | null> {
const headers: Record<string, string> = {
'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<string, string> = {
'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`, {