lint bro happ + test for getUserProject

This commit is contained in:
al8763be 2024-03-18 21:08:33 +01:00
parent 4392b68397
commit 8eb23bf7f9
6 changed files with 22 additions and 13 deletions

View file

@ -150,7 +150,10 @@ export const api: API = {
}
},
async getUserProjects(token: string): Promise<APIResponse<Project[]>> {
async getUserProjects(
username: string,
token: string,
): Promise<APIResponse<Project[]>> {
try {
const response = await fetch("/api/getUserProjects", {
method: "GET",
@ -158,6 +161,7 @@ export const api: API = {
"Content-Type": "application/json",
Authorization: "Bearer " + token,
},
body: JSON.stringify({ username }),
});
if (!response.ok) {