diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 18:25:58 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 18:25:58 +0000 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /app/assets/javascripts/ci_variable_list/store/actions.js | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) | |
download | gitlab-ce-a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4.tar.gz |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'app/assets/javascripts/ci_variable_list/store/actions.js')
-rw-r--r-- | app/assets/javascripts/ci_variable_list/store/actions.js | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/app/assets/javascripts/ci_variable_list/store/actions.js b/app/assets/javascripts/ci_variable_list/store/actions.js index 8569cecc6a7..8a182737e7b 100644 --- a/app/assets/javascripts/ci_variable_list/store/actions.js +++ b/app/assets/javascripts/ci_variable_list/store/actions.js @@ -1,5 +1,5 @@ import Api from '~/api'; -import { deprecatedCreateFlash as createFlash } from '~/flash'; +import createFlash from '~/flash'; import axios from '~/lib/utils/axios_utils'; import { __ } from '~/locale'; import * as types from './mutation_types'; @@ -48,7 +48,9 @@ export const addVariable = ({ state, dispatch }) => { dispatch('fetchVariables'); }) .catch((error) => { - createFlash(error.response.data[0]); + createFlash({ + message: error.response.data[0], + }); dispatch('receiveAddVariableError', error); }); }; @@ -78,7 +80,9 @@ export const updateVariable = ({ state, dispatch }) => { dispatch('fetchVariables'); }) .catch((error) => { - createFlash(error.response.data[0]); + createFlash({ + message: error.response.data[0], + }); dispatch('receiveUpdateVariableError', error); }); }; @@ -105,7 +109,9 @@ export const fetchVariables = ({ dispatch, state }) => { dispatch('receiveVariablesSuccess', prepareDataForDisplay(data.variables)); }) .catch(() => { - createFlash(__('There was an error fetching the variables.')); + createFlash({ + message: __('There was an error fetching the variables.'), + }); }); }; @@ -133,7 +139,9 @@ export const deleteVariable = ({ dispatch, state }) => { dispatch('fetchVariables'); }) .catch((error) => { - createFlash(error.response.data[0]); + createFlash({ + message: error.response.data[0], + }); dispatch('receiveDeleteVariableError', error); }); }; @@ -154,7 +162,9 @@ export const fetchEnvironments = ({ dispatch, state }) => { dispatch('receiveEnvironmentsSuccess', prepareEnvironments(res.data)); }) .catch(() => { - createFlash(__('There was an error fetching the environments information.')); + createFlash({ + message: __('There was an error fetching the environments information.'), + }); }); }; |