Created
December 16, 2019 11:29
-
-
Save anoobbava/ce82e8d7c03b62ef3c513a4f55f53f92 to your computer and use it in GitHub Desktop.
article
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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