From 10d06767c4a35ee8e6c604f9c371ab6f8beef832 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 fd6b4d8..e9820a0 100644 --- a/frontend/src/API/API.ts +++ b/frontend/src/API/API.ts @@ -540,7 +540,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: { @@ -568,7 +568,7 @@ export const api: API = { ): Promise> { try { const response = await fetch( - `/api/getAllWeeklyReports/${projectName}?targetUser=${targetUser}`, + `/api/getAllWeeklyReports/${projectName}?targetUser=${targetUser ?? ""}`, { method: "GET", headers: {