Skip to content

Instantly share code, notes, and snippets.

@dvallin
Created November 29, 2017 16:46
Show Gist options
  • Save dvallin/ef269c7f15d7a7c0b33b44546169816e to your computer and use it in GitHub Desktop.
Save dvallin/ef269c7f15d7a7c0b33b44546169816e to your computer and use it in GitHub Desktop.
[Actions.FetchTasks] ({commit}, payload: FetchTasks): Promise<void> {
return TasksApi.fetchTasks()
.then(tasks => {
commit({
type: Mutations.FetchTasksSucceeded,
tasks
});
})
.catch(error => {
commit({
type: Mutations.FetchTasksFailed,
error
});
});
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment