Fix for javascript optional parameter formatting error
This commit is contained in:
parent
f9c30c4951
commit
76ae587116
1 changed files with 2 additions and 2 deletions
|
@ -538,7 +538,7 @@ export const api: API = {
|
||||||
): Promise<APIResponse<WeeklyReport>> {
|
): Promise<APIResponse<WeeklyReport>> {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`/api/getWeeklyReport?projectName=${projectName}&week=${week}&targetUser=${targetUser}`,
|
`/api/getWeeklyReport?projectName=${projectName}&week=${week}&targetUser=${targetUser ?? ""}`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -566,7 +566,7 @@ export const api: API = {
|
||||||
): Promise<APIResponse<WeeklyReport[]>> {
|
): Promise<APIResponse<WeeklyReport[]>> {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`/api/getAllWeeklyReports/${projectName}?targetUser=${targetUser}`,
|
`/api/getAllWeeklyReports/${projectName}?targetUser=${targetUser ?? ""}`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
|
|
Loading…
Reference in a new issue