diff options
Diffstat (limited to 'app/assets/javascripts/jobs/store/actions.js')
-rw-r--r-- | app/assets/javascripts/jobs/store/actions.js | 8 |
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')); }; |