All files / app/assets/javascripts/ide/stores/modules/file_templates mutations.js

100% Statements 8/8
100% Branches 0/0
100% Functions 5/5
100% Lines 8/8

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23        2x 2x     1x     2x 2x     2x 2x     1x      
import * as types from './mutation_types';
 
export default {
  [types.REQUEST_TEMPLATE_TYPES](state) {
    state.isLoading = true;
    state.templates = [];
  },
  [types.RECEIVE_TEMPLATE_TYPES_ERROR](state) {
    state.isLoading = false;
  },
  [types.RECEIVE_TEMPLATE_TYPES_SUCCESS](state, templates) {
    state.isLoading = false;
    state.templates = templates;
  },
  [types.SET_SELECTED_TEMPLATE_TYPE](state, type) {
    state.selectedTemplateType = type;
    state.templates = [];
  },
  [types.SET_UPDATE_SUCCESS](state, success) {
    state.updateSuccess = success;
  },
};