marc-leopold/store/index.js

12 lines
291 B
JavaScript

export const state = () => ({})
export const actions = {
async nuxtServerInit ({ commit }, { $axios }) {
const { siteNav, socialNav } = await $axios.$get('/api/v1/navigation')
commit('navigation/updateSiteNav', siteNav)
commit('navigation/updateSocialNav', socialNav)
}
}