summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/search/store/mutations.js
blob: e57850b870e2324340aad1dfde4edab70bf4fdd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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;
  },
};