Retrieve submission metadata

This commit is contained in:
nemunaire 2022-09-05 04:07:41 +02:00
commit ca55ba9b2e
5 changed files with 108 additions and 0 deletions

View file

@ -36,6 +36,17 @@ export class WorkRepository {
}
}
async getSubmission() {
const res = await fetch(`api/repositories/${this.id}/submission`, {
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',