-
-
Save dvallin/ef269c7f15d7a7c0b33b44546169816e to your computer and use it in GitHub Desktop.
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.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