repo: Admin can override default expected tag

This commit is contained in:
nemunaire 2022-09-25 17:41:47 +02:00
commit 1859a715df
3 changed files with 34 additions and 4 deletions

View file

@ -54,10 +54,11 @@ export class WorkRepository {
}
}
async retrieveWork() {
async retrieveWork(tag) {
const res = await fetch(this.id_work?`api/works/${this.id_work}/repositories/${this.id}/trigger`:`api/repositories/${this.id}/trigger`, {
method: 'POST',
headers: {'Accept': 'application/json'}
headers: {'Accept': 'application/json'},
body: !tag || tag.length == 0?null:JSON.stringify(tag)
});
if (res.status == 200) {
const data = await res.json();