New route to run gradation tests
This commit is contained in:
parent
7340e10a7a
commit
735a120259
3 changed files with 125 additions and 6 deletions
|
|
@ -76,6 +76,18 @@ export class WorkRepository {
|
|||
}
|
||||
}
|
||||
|
||||
async runGradation() {
|
||||
const res = await fetch(this.id_work?`api/works/${this.id_work}/repositories/${this.id}/gradation`:`api/repositories/${this.id}/gradation`, {
|
||||
method: 'POST',
|
||||
headers: {'Accept': 'application/json'},
|
||||
});
|
||||
if (res.status == 200) {
|
||||
return await res.json();
|
||||
} else {
|
||||
throw new Error((await res.json()).errmsg);
|
||||
}
|
||||
}
|
||||
|
||||
async save(user) {
|
||||
let url = this.id?`repositories/${this.id}`:'repositories';
|
||||
|
||||
|
|
|
|||
Reference in a new issue