/* eslint-disable */
import axios from 'axios';

export default {
  namespaced: true,
  state: {
    roles: [],
  },
  mutations: {
    getRoles(state, roles) {
      state.roles = roles;
    },
  },
  getters: {
    getRoles: (state) => state.roles
  },
  actions: {
    async retrieveUserRoles({commit}){
        await axios.get('/api/userRole')
        .then((result) => {
            commit('getRoles', result.data)
        })
        .catch((e) => console.log(e))
    }
  },
};
