Skip to content

Instantly share code, notes, and snippets.

@anoobbava
Created December 16, 2019 13:30
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/10ff8419d9380c97b8b7194f11885e76 to your computer and use it in GitHub Desktop.
Save anoobbava/10ff8419d9380c97b8b7194f11885e76 to your computer and use it in GitHub Desktop.
async updateTodo (todo) {
const updatedTodoHash = { is_completed: todo.is_completed }
const response = await axios.put('todos/' + todo.id, updatedTodoHash)
return response.data
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment