Fixing error in ts API, fixing AllTimeReportsInProject

This commit is contained in:
Imbus 2024-03-20 17:31:59 +01:00
parent 933191b076
commit 0017e9b9ef
2 changed files with 2 additions and 4 deletions

View file

@ -58,7 +58,6 @@ interface API {
* @returns {APIResponse<WeeklyReport[]>} A list of weekly reports
*/
getWeeklyReportsForUser(
username: string,
projectName: string,
token: string,
): Promise<APIResponse<WeeklyReport[]>>;

View file

@ -15,10 +15,9 @@ function AllTimeReportsInProject(): JSX.Element {
const getWeeklyReports = async (): Promise<void> => {
const token = localStorage.getItem("accessToken") ?? "";
const response = await api.getWeeklyReportsForProject(
localStorage.getItem("username") ?? "",
projectName ?? "",
const response = await api.getWeeklyReportsForUser(
token,
projectName ?? "",
);
console.log(response);
if (response.success) {