lint bro happ + test for getUserProject
This commit is contained in:
parent
4392b68397
commit
8eb23bf7f9
6 changed files with 22 additions and 13 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue