[Vuejs]-Axios Get with Header in Vuex – NUXTJS

2👍

Actions in Vuex can’t contain more than one parameter. Group up your params into a single object, like so:

return store.dispatch('getProfile', { params: params, config: this.config })

Then access from your action like so:

getProfile ({commit}, obj) {
  var params = obj.params
  var config = obj.config
  /* ... */
}

If you look at the section Dispatching Actions in the docs it shows the correct way to pass params.

Leave a comment