summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/jobs/store/actions.js
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-08-27 10:43:04 +0200
committerFilipa Lacerda <filipa@gitlab.com>2018-08-27 10:43:04 +0200
commit89aefc28d722700eebe0f93625cb490d3e1c9387 (patch)
tree04081c013e6026fee27b424ce14a255c3ce65add /app/assets/javascripts/jobs/store/actions.js
parente505ea18c48724025645df76509524d298984598 (diff)
downloadgitlab-ce-89aefc28d722700eebe0f93625cb490d3e1c9387.tar.gz
Adds specs for actions50101-vuex-store
Diffstat (limited to 'app/assets/javascripts/jobs/store/actions.js')
-rw-r--r--app/assets/javascripts/jobs/store/actions.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/jobs/store/actions.js b/app/assets/javascripts/jobs/store/actions.js
index 9f62d3f52fa..a0845bb803c 100644
--- a/app/assets/javascripts/jobs/store/actions.js
+++ b/app/assets/javascripts/jobs/store/actions.js
@@ -38,7 +38,7 @@ export const fetchJob = ({ state, dispatch }) => {
return axios.get(endpoint);
},
},
- data: state.endpoint,
+ data: state.jobEndpoint,
method: 'getJob',
successCallback: ({ data }) => dispatch('receiveJobSuccess', data),
errorCallback: () => dispatch('receiveJobError'),
@@ -48,7 +48,7 @@ export const fetchJob = ({ state, dispatch }) => {
eTagPoll.makeRequest();
} else {
axios
- .get(state.endpoint)
+ .get(state.jobEndpoint)
.then(({ data }) => dispatch('receiveJobSuccess', data))
.catch(() => dispatch('receiveJobError'));
}
@@ -155,12 +155,12 @@ export const requestJobsForStage = ({ commit }) => commit(types.REQUEST_JOBS_FOR
export const setSelectedStage = ({ commit }, stage) => commit(types.SET_SELECTED_STAGE, stage);
// On stage click, set selected stage + fetch job
-export const fetchJobsForStage = ({ dispatch }, stage) => {
+export const fetchJobsForStage = ({ state, dispatch }, stage) => {
dispatch('setSelectedStage', stage);
dispatch('requestJobsForStage');
axios
- .get()
+ .get(state.stageJobsEndpoint)
.then(({ data }) => dispatch('receiveJobsForStageSuccess', data))
.catch(() => dispatch('receiveJobsForStageError'));
};