Last active
November 4, 2015 10:45
-
-
Save fariszacina/2ff9cad934ca3ddcf2f1 to your computer and use it in GitHub Desktop.
Promise Pyramid of Doom - Resolved
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
| export function bookApartment(req, res, next) { | |
| booking | |
| .create(req.booking) | |
| .then((data) => notifier.sendBookingConfirmation(data)) | |
| .then((result) => statistics.log(result)) | |
| .then(() => log.debug('booking-succeeded')) | |
| .then(() => res.send(200)) | |
| .catch((err) => next(err)) | |
| .done(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment