Retrieve submission metadata
This commit is contained in:
parent
6245e49be7
commit
ca55ba9b2e
5 changed files with 108 additions and 0 deletions
|
|
@ -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',
|
||||
|
|
|
|||
Reference in a new issue