%PDF- %PDF-
Direktori : /home/forge/takeaseat.eco-n-tech.co.uk/store/ |
Current File : //home/forge/takeaseat.eco-n-tech.co.uk/store/specialisms.js |
export const state = () => ({ list: [], single: null }) export const mutations = { setList(state, data) { state.list = data }, setSingle(state, data) { state.single = data }, } export const actions = { async list({ commit, error }, payload) { await this.$axios.get('/specialisms') .then((res) => { if (res.status === 200) { commit('setList', res.data.data) } }) }, async get({ commit, error }, payload) { await this.$axios.get('/specialisms/'+payload) .then((res) => { if (res.status === 200) { commit('setSingle', res.data.data) } }) }, }