diff options
Diffstat (limited to 'app/assets/javascripts/whats_new/store/actions.js')
-rw-r--r-- | app/assets/javascripts/whats_new/store/actions.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/assets/javascripts/whats_new/store/actions.js b/app/assets/javascripts/whats_new/store/actions.js index 53488413d9e..a84dfb399d8 100644 --- a/app/assets/javascripts/whats_new/store/actions.js +++ b/app/assets/javascripts/whats_new/store/actions.js @@ -1,10 +1,20 @@ import * as types from './mutation_types'; +import axios from '~/lib/utils/axios_utils'; export default { closeDrawer({ commit }) { commit(types.CLOSE_DRAWER); }, - openDrawer({ commit }) { + openDrawer({ commit }, storageKey) { commit(types.OPEN_DRAWER); + + if (storageKey) { + localStorage.setItem(storageKey, JSON.stringify(false)); + } + }, + fetchItems({ commit }) { + return axios.get('/-/whats_new').then(({ data }) => { + commit(types.SET_FEATURES, data); + }); }, }; |