summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-02-27 16:06:44 +0000
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-02-28 10:47:48 +0100
commitd92b9fefdb8800219aa02f4b9cc34f8ce4df9a26 (patch)
treef518073fc694b0b7ff8c955d5358915486ad4ef6
parentf0f7af50696035946075daf47cf3ff04117af6bf (diff)
downloadgitlab-ce-d92b9fefdb8800219aa02f4b9cc34f8ce4df9a26.tar.gz
Adds frontend needed changes to accomodate for new endpoint schema
-rw-r--r--app/assets/javascripts/commit/pipelines/pipelines_table.js.es64
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/commit/pipelines/pipelines_table.js.es6 b/app/assets/javascripts/commit/pipelines/pipelines_table.js.es6
index e7c6c063413..cd2bd883d32 100644
--- a/app/assets/javascripts/commit/pipelines/pipelines_table.js.es6
+++ b/app/assets/javascripts/commit/pipelines/pipelines_table.js.es6
@@ -69,7 +69,9 @@ const PipelineStore = require('./pipelines_store');
return pipelinesService.all()
.then(response => response.json())
.then((json) => {
- this.store.storePipelines(json);
+ // depending of the endpoint the response can either bring a `pipelines` key or not.
+ const pipelines = json.pipelines || json;
+ this.store.storePipelines(pipelines);
this.isLoading = false;
})
.catch(() => {