New route to retrieve gradation status
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1515140c09
commit
184daa4cab
3 changed files with 65 additions and 8 deletions
|
|
@ -88,6 +88,18 @@ export class WorkRepository {
|
|||
}
|
||||
}
|
||||
|
||||
async gradationStatus() {
|
||||
const res = await fetch(this.id_work?`api/works/${this.id_work}/repositories/${this.id}/gradation_status`:`api/repositories/${this.id}/gradation_status`, {
|
||||
method: 'GET',
|
||||
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