Merge branch 'BumBranch' into gruppDM
This commit is contained in:
commit
847073c6f8
8 changed files with 182 additions and 31 deletions
|
@ -49,7 +49,7 @@ interface API {
|
|||
week: string,
|
||||
token: string,
|
||||
): Promise<APIResponse<WeeklyReport>>;
|
||||
getWeeklyReportsForProject(
|
||||
getWeeklyReportsForUser(
|
||||
username: string,
|
||||
projectName: string,
|
||||
token: string,
|
||||
|
@ -276,19 +276,18 @@ export const api: API = {
|
|||
}
|
||||
},
|
||||
|
||||
async getWeeklyReportsForProject(
|
||||
async getWeeklyReportsForUser(
|
||||
username: string,
|
||||
projectName: string,
|
||||
token: string,
|
||||
): Promise<APIResponse<WeeklyReport[]>> {
|
||||
try {
|
||||
const response = await fetch("/api/getWeeklyReportsUser", {
|
||||
const response = await fetch(`/api/getWeeklyReportsUser?username=${username}&projectName=${projectName}`, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: "Bearer " + token,
|
||||
},
|
||||
body: JSON.stringify({ username, projectName }),
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue