Can show repository logs in admin interface
Some checks are pending
continuous-integration/drone/push Build is running
Some checks are pending
continuous-integration/drone/push Build is running
This commit is contained in:
parent
5940f14474
commit
5b3bdb0429
3 changed files with 44 additions and 6 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Reference in a new issue