diff --git a/src/components/projects.vue b/src/components/projects.vue index 126ca14..f047dc6 100644 --- a/src/components/projects.vue +++ b/src/components/projects.vue @@ -39,16 +39,14 @@ export default { } }, fetchProjects(ownertype, ownername) { - let path = "/" + ownertype; - if (ownername) { - path += "/" + ownername; - } + let path = + "/projectgroups/" + encodeURIComponent(ownertype + "/" + ownername); path += "/projects"; fetch(apiurl(path)) .then(res => res.json()) .then(res => { console.log(res); - let projects = res.projects.map(function(project) { + let projects = res.map(function(project) { return project; }); this.projects = projects; diff --git a/src/components/runs.vue b/src/components/runs.vue index 702cf44..6e0d5f2 100644 --- a/src/components/runs.vue +++ b/src/components/runs.vue @@ -100,16 +100,12 @@ export default { return "unknown"; }, fetchProjectRuns() { - fetch( - apiurl( - "/projects/" + - this.ownertype + - "/" + - this.ownername + - "/" + - this.projectname - ) - ) + let path = + "/projects/" + + encodeURIComponent( + this.ownertype + "/" + this.ownername + "/" + this.projectname + ); + fetch(apiurl(path)) .then(res => res.json()) .then(res => { console.log(res); @@ -144,7 +140,7 @@ export default { .then(res => res.json()) .then(res => { console.log(res); - let runs = res.runs.map(function(run) { + let runs = res.map(function(run) { return run; }); this.runs = runs; diff --git a/src/views/Login.vue b/src/views/Login.vue index 20242c5..58dbaae 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -37,7 +37,7 @@ export default { .then(res => res.json()) .then(res => { console.log("remote sources result", res); - this.remotesources = res.remote_sources; + this.remotesources = res; }); }, doLogin(rsName, username, password) {