debian-mirror-gitlab/app/assets/javascripts/search/store/mutations.js

19 lines
430 B
JavaScript
Raw Normal View History

2021-01-29 00:20:46 +05:30
import * as types from './mutation_types';
export default {
[types.REQUEST_GROUPS](state) {
state.fetchingGroups = true;
},
[types.RECEIVE_GROUPS_SUCCESS](state, data) {
state.fetchingGroups = false;
state.groups = data;
},
[types.RECEIVE_GROUPS_ERROR](state) {
state.fetchingGroups = false;
state.groups = [];
},
[types.SET_QUERY](state, { key, value }) {
state.query[key] = value;
},
};