mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
23 lines
375 B
JavaScript
23 lines
375 B
JavaScript
|
import api from './api'
|
||
|
|
||
|
export default {
|
||
|
state: () => ({
|
||
|
domains: undefined
|
||
|
}),
|
||
|
mutations: {
|
||
|
'SET_DATA' (state, { key, data }) {
|
||
|
state[key] = data
|
||
|
}
|
||
|
},
|
||
|
actions: {
|
||
|
async 'FETCH' ({ commit }, uri) {
|
||
|
return api.get('/' + uri).then(data => {
|
||
|
commit('SET_DATA', { data: data[uri], key: uri })
|
||
|
})
|
||
|
}
|
||
|
},
|
||
|
getters: {
|
||
|
|
||
|
}
|
||
|
}
|