diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-19 21:09:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-19 21:09:34 +0300 |
commit | d4e22f4ade1ce4dfd54f4d1740f074b2be441705 (patch) | |
tree | 5f1f1bbe3c7673905804170bfd1becf665d4b0b5 /app/assets/javascripts/self_monitor | |
parent | c18599314d98c0aa4dfe7d56423469f0b641d066 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/self_monitor')
-rw-r--r-- | app/assets/javascripts/self_monitor/store/actions.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/self_monitor/store/actions.js b/app/assets/javascripts/self_monitor/store/actions.js index 5b9e994290c..7198dbe8b04 100644 --- a/app/assets/javascripts/self_monitor/store/actions.js +++ b/app/assets/javascripts/self_monitor/store/actions.js @@ -1,6 +1,6 @@ import axios from '~/lib/utils/axios_utils'; import { backOff } from '~/lib/utils/common_utils'; -import statusCodes from '~/lib/utils/http_status'; +import statusCodes, { HTTP_STATUS_ACCEPTED } from '~/lib/utils/http_status'; import { __, s__ } from '~/locale'; import * as types from './mutation_types'; @@ -10,7 +10,7 @@ function backOffRequest(makeRequestCallback) { return backOff((next, stop) => { makeRequestCallback() .then((resp) => { - if (resp.status === statusCodes.ACCEPTED) { + if (resp.status === HTTP_STATUS_ACCEPTED) { next(); } else { stop(resp); @@ -31,7 +31,7 @@ export const requestCreateProject = ({ dispatch, state, commit }) => { axios .post(state.createProjectEndpoint) .then((resp) => { - if (resp.status === statusCodes.ACCEPTED) { + if (resp.status === HTTP_STATUS_ACCEPTED) { dispatch('requestCreateProjectStatus', resp.data.job_id); } }) @@ -83,7 +83,7 @@ export const requestDeleteProject = ({ dispatch, state, commit }) => { axios .delete(state.deleteProjectEndpoint) .then((resp) => { - if (resp.status === statusCodes.ACCEPTED) { + if (resp.status === HTTP_STATUS_ACCEPTED) { dispatch('requestDeleteProjectStatus', resp.data.job_id); } }) |