Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mutations.js « store « related_merge_requests « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 11ca28a5fb9643293406be55726def12554f2c6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import * as types from './mutation_types';

export default {
  [types.SET_INITIAL_STATE](state, { apiEndpoint }) {
    state.apiEndpoint = apiEndpoint;
  },
  [types.REQUEST_DATA](state) {
    state.isFetchingMergeRequests = true;
  },
  [types.RECEIVE_DATA_SUCCESS](state, { data, total }) {
    state.isFetchingMergeRequests = false;
    state.mergeRequests = data;
    state.totalCount = total;
  },
  [types.RECEIVE_DATA_ERROR](state) {
    state.isFetchingMergeRequests = false;
    state.hasErrorFetchingMergeRequests = true;
  },
};