From 76ae587116e080ba758400055548394b6eaf55b0 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Wed, 3 Apr 2024 18:05:56 +0200 Subject: [PATCH] Fix for javascript optional parameter formatting error --- frontend/src/API/API.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/API/API.ts b/frontend/src/API/API.ts index c4cf445..b3c6eae 100644 --- a/frontend/src/API/API.ts +++ b/frontend/src/API/API.ts @@ -538,7 +538,7 @@ export const api: API = { ): Promise> { try { const response = await fetch( - `/api/getWeeklyReport?projectName=${projectName}&week=${week}&targetUser=${targetUser}`, + `/api/getWeeklyReport?projectName=${projectName}&week=${week}&targetUser=${targetUser ?? ""}`, { method: "GET", headers: { @@ -566,7 +566,7 @@ export const api: API = { ): Promise> { try { const response = await fetch( - `/api/getAllWeeklyReports/${projectName}?targetUser=${targetUser}`, + `/api/getAllWeeklyReports/${projectName}?targetUser=${targetUser ?? ""}`, { method: "GET", headers: {