Skip to content

Instantly share code, notes, and snippets.

@dvallin
Created November 29, 2017 16:46
Show Gist options
  • Save dvallin/b72175413c68753db1316f5eca132828 to your computer and use it in GitHub Desktop.
Save dvallin/b72175413c68753db1316f5eca132828 to your computer and use it in GitHub Desktop.
return TasksApi.addTask(title)
.then(task => {
commit({
type: Mutations.AddTaskSucceeded,
task
});
})
.catch(error => {
commit({
type: Mutations.AddTaskFailed
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment