Can display extraction logs

This commit is contained in:
nemunaire 2022-09-05 04:58:48 +02:00
commit 0b16676929
3 changed files with 84 additions and 19 deletions

View file

@ -36,6 +36,17 @@ export class WorkRepository {
}
}
async getBuildLogs() {
const res = await fetch(`api/repositories/${this.id}/state-logs`, {
headers: {'Accept': 'application/json'}
});
if (res.status == 200) {
return await res.json();
} else {
throw new Error((await res.json()).errmsg);
}
}
async retrieveWork() {
const res = await fetch(`api/repositories/${this.id}/trigger`, {
method: 'POST',