Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-26 00:10:30 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-26 00:10:30 +0300
commit97cdd36a0b70b11e2592f3f63f7aca83342c8dfa (patch)
tree6169cbeea88584c9dfac8afa5ea4a6c6d7dd3206 /app/assets/javascripts/pipeline_new
parent2b349d9a94f00320a82e24be96ee8aeda9135702 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pipeline_new')
-rw-r--r--app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue18
1 files changed, 11 insertions, 7 deletions
diff --git a/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue b/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue
index e079603a5d4..ede8626607c 100644
--- a/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue
+++ b/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue
@@ -15,7 +15,7 @@ import {
GlSprintf,
} from '@gitlab/ui';
import { s__, __ } from '~/locale';
-import Api from '~/api';
+import axios from '~/lib/utils/axios_utils';
import { redirectTo } from '~/lib/utils/url_utility';
import { VARIABLE_TYPE, FILE_TYPE } from '../constants';
@@ -145,13 +145,17 @@ export default {
({ key, value }) => key !== '' && value !== '',
);
- return Api.createPipeline(this.projectId, {
- ref: this.refValue,
- variables: filteredVariables,
- })
- .then(({ data }) => redirectTo(data.web_url))
+ return axios
+ .post(this.pipelinesPath, {
+ ref: this.refValue,
+ variables: filteredVariables,
+ })
+ .then(({ data }) => {
+ redirectTo(`${this.pipelinesPath}/${data.id}`);
+ })
.catch(err => {
- this.error = err.response.data.message.base;
+ const [message] = err.response.data.base;
+ this.error = message;
});
},
},