Jag avskyr denna handlern

This commit is contained in:
al8763be 2024-03-20 15:17:00 +01:00
parent 7d30165465
commit af5813681d

View file

@ -280,13 +280,12 @@ export const api: API = {
token: string, token: string,
): Promise<APIResponse<WeeklyReport[]>> { ): Promise<APIResponse<WeeklyReport[]>> {
try { try {
const response = await fetch("/api/getWeeklyReportsUser", { const response = await fetch(`/api/getWeeklyReportsUser?username=${username}&projectName=${projectName}`, {
method: "GET", method: "GET",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
Authorization: "Bearer " + token, Authorization: "Bearer " + token,
}, },
body: JSON.stringify({ username: username, projectName: projectName}),
}); });
if (!response.ok) { if (!response.ok) {