Skip to content

Instantly share code, notes, and snippets.

@anoobbava
Created December 16, 2019 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anoobbava/ce82e8d7c03b62ef3c513a4f55f53f92 to your computer and use it in GitHub Desktop.
Save anoobbava/ce82e8d7c03b62ef3c513a4f55f53f92 to your computer and use it in GitHub Desktop.
article
actions: {
fetchAllTodoAction ({ commit }) {
return new Promise((resolve, reject) => {
ApiHelper.todos()
.then(response => {
commit('fetchAllTodoMutation', response)
resolve(response)
})
.catch(error => {
commit('failureTodoMutation')
reject(error)
})
})
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment