debian-mirror-gitlab/app/assets/javascripts/reports/accessibility_report/store/mutations.js
2020-05-24 23:13:21 +05:30

20 lines
472 B
JavaScript

import * as types from './mutation_types';
export default {
[types.SET_ENDPOINT](state, endpoint) {
state.endpoint = endpoint;
},
[types.REQUEST_REPORT](state) {
state.isLoading = true;
},
[types.RECEIVE_REPORT_SUCCESS](state, report) {
state.hasError = false;
state.isLoading = false;
state.report = report;
},
[types.RECEIVE_REPORT_ERROR](state) {
state.isLoading = false;
state.hasError = true;
state.report = {};
},
};