summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/releases/stores
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-24 18:09:05 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-24 18:09:05 +0000
commitc2367afbf57ebc65d5b78a743b5d6a91f0aece9f (patch)
tree165c2c54bf72ab3a3a9417d97f63ece5c9eba9f5 /app/assets/javascripts/releases/stores
parent51a9512965d86e3094968fa514e4ae8a96d38cf3 (diff)
downloadgitlab-ce-c2367afbf57ebc65d5b78a743b5d6a91f0aece9f.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/releases/stores')
-rw-r--r--app/assets/javascripts/releases/stores/modules/detail/actions.js3
-rw-r--r--app/assets/javascripts/releases/stores/modules/list/actions.js12
2 files changed, 11 insertions, 4 deletions
diff --git a/app/assets/javascripts/releases/stores/modules/detail/actions.js b/app/assets/javascripts/releases/stores/modules/detail/actions.js
index c9749582f5c..f730af1c7dc 100644
--- a/app/assets/javascripts/releases/stores/modules/detail/actions.js
+++ b/app/assets/javascripts/releases/stores/modules/detail/actions.js
@@ -22,8 +22,7 @@ export const fetchRelease = ({ dispatch, state }) => {
return api
.release(state.projectId, state.tagName)
.then(({ data: release }) => {
- const camelCasedRelease = convertObjectPropsToCamelCase(release, { deep: true });
- dispatch('receiveReleaseSuccess', camelCasedRelease);
+ dispatch('receiveReleaseSuccess', convertObjectPropsToCamelCase(release, { deep: true }));
})
.catch(error => {
dispatch('receiveReleaseError', error);
diff --git a/app/assets/javascripts/releases/stores/modules/list/actions.js b/app/assets/javascripts/releases/stores/modules/list/actions.js
index b15fb69226f..06d13890a9d 100644
--- a/app/assets/javascripts/releases/stores/modules/list/actions.js
+++ b/app/assets/javascripts/releases/stores/modules/list/actions.js
@@ -2,7 +2,11 @@ import * as types from './mutation_types';
import createFlash from '~/flash';
import { __ } from '~/locale';
import api from '~/api';
-import { normalizeHeaders, parseIntPagination } from '~/lib/utils/common_utils';
+import {
+ normalizeHeaders,
+ parseIntPagination,
+ convertObjectPropsToCamelCase,
+} from '~/lib/utils/common_utils';
/**
* Commits a mutation to update the state while the main endpoint is being requested.
@@ -28,7 +32,11 @@ export const fetchReleases = ({ dispatch }, { page = '1', projectId }) => {
export const receiveReleasesSuccess = ({ commit }, { data, headers }) => {
const pageInfo = parseIntPagination(normalizeHeaders(headers));
- commit(types.RECEIVE_RELEASES_SUCCESS, { data, pageInfo });
+ const camelCasedReleases = convertObjectPropsToCamelCase(data, { deep: true });
+ commit(types.RECEIVE_RELEASES_SUCCESS, {
+ data: camelCasedReleases,
+ pageInfo,
+ });
};
export const receiveReleasesError = ({ commit }) => {