import axios from 'axios';

export default {
  namespaced: true,
  state: {
    unitConfigurationList: [],
  },
  mutations: {
    setUnitConfigurationList(state, list) {
      state.unitConfigurationList = list;
    },
  },
  getters: {},
  actions: {
    getUnitConfigurationList({
      commit,
    }) {
      axios.get('http://localhost:57260/api/unitConfiguration')
        .then(result => commit('setUnitConfigurationList', result.data))
        .catch(console.error);
    },
  },
};
