Able to retrieve submission status
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nemunaire 2022-07-08 14:02:45 +02:00
commit 777682a656
4 changed files with 43 additions and 0 deletions

View file

@ -118,3 +118,14 @@ export async function getWork(wid) {
throw new Error((await res.json()).errmsg);
}
}
export async function getUserRendu(baseurl, user) {
const res = await fetch(baseurl.replace("%l", user.login).replace("%i", user.id))
if (res.status == 200) {
return await res.json();
} else if (res.status == 404) {
return await res.json();
} else {
throw new Error((await res.json()).errmsg);
}
}