Skip to content

Instantly share code, notes, and snippets.

@rbren
Created September 21, 2017 17:25
Show Gist options
  • Save rbren/6662a0834ac07816f605b834e1bbf7e9 to your computer and use it in GitHub Desktop.
Save rbren/6662a0834ac07816f605b834e1bbf7e9 to your computer and use it in GitHub Desktop.
api.getItem(1)
.then(item => {
item.amount++;
api.updateItem(1, item)
.then(update => {
api.deleteItem(1)
.then(deletion => {
console.log('done!');
})
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment