Last active
September 25, 2017 17:58
-
-
Save rbren/3fe563ca3b0ccd5e050dac28d3cc2cf0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| Promise.resolve() | |
| .then(_ => { | |
| return api.getItem(1) | |
| }) | |
| .then(item => { | |
| item.amount++ | |
| return api.updateItem(1, item); | |
| }) | |
| .then(update => { | |
| return api.deleteItem(1); | |
| }) | |
| .catch(e => { | |
| console.log('error while working on item 1'); | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment