Creating a github repository

- Creating a github repo so just commiting everything
This commit is contained in:
2020-11-14 06:27:02 +00:00
parent a3fbc61162
commit 140f07cb24
4 changed files with 26 additions and 1 deletions

19
store/common.js Normal file
View File

@@ -0,0 +1,19 @@
export const state = () => ({
categories: []
})
export const mutations = {
setCategories(state, data) {
state.categories = data || []
}
}
export const actions = {
async getCategories({commit}) {
const data = await this.$api.$get('/categories').catch(err => {
console.error({err})
})
console.log(data)
commit('setCategories', data?.data || [])
}
}