diff --git a/frontend/src/API/API.ts b/frontend/src/API/API.ts index 6a508b5..bcd22eb 100644 --- a/frontend/src/API/API.ts +++ b/frontend/src/API/API.ts @@ -49,6 +49,14 @@ interface API { week: string, token: string, ): Promise>; + /** + * Returns all the weekly reports for a user in a particular project + * The username is derived from the token + * + * @param {string} projectName The name of the project + * @param {string} token The token of the user + * @returns {APIResponse} A list of weekly reports + */ getWeeklyReportsForUser( username: string, projectName: string, @@ -275,12 +283,11 @@ export const api: API = { }, async getWeeklyReportsForUser( - username: string, projectName: string, token: string, ): Promise> { try { - const response = await fetch(`/api/getWeeklyReportsUser?username=${username}&projectName=${projectName}`, { + const response = await fetch(`/api/getWeeklyReportsUser/${projectName}`, { method: "GET", headers: { "Content-Type": "application/json",