You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
450 B

3 years ago
import { BASE_API_URL, getAxiosConfig } from '@/constants'
export const state = () => ({
users: [],
lastSync: 0
})
export const mutations = {
setUsers(state, users) {
state.users = users
},
}
export const getters = {
}
export const actions = {
fetchUsers({ commit }) {
return this.$axios.$get(BASE_API_URL + '/users', getAxiosConfig(localStorage.getItem("token"))).then(users => {
commit('setUsers', users)
})
},
}