Can show repository logs in admin interface
Some checks are pending
continuous-integration/drone/push Build is running

This commit is contained in:
nemunaire 2022-09-16 12:03:50 +02:00
commit 5b3bdb0429
3 changed files with 44 additions and 6 deletions

View file

@ -37,8 +37,14 @@ export class WorkRepository {
}
}
async getBuildLogs() {
const res = await fetch(this.id_work?`api/works/${this.id_work}/repositories/${this.id}/state-logs`:`api/repositories/${this.id}/state-logs`, {
async getBuildLogs(userid) {
let url = this.id_work?`works/${this.id_work}/repositories/${this.id}/state-logs`:`repositories/${this.id}/state-logs`;
if (userid) {
url = `users/${userid}/` + url;
}
const res = await fetch("api/" + url, {
headers: {'Accept': 'application/json'}
});
if (res.status == 200) {