import axios from 'axios';

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