Created
August 26, 2015 18:46
-
-
Save nlf/b75d78b3104c9a055ee4 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
| var handler = function (request, reply) { | |
| doSomethingWithAPromise().then(function (result) { | |
| if (!result) { | |
| return reply.view('error'); | |
| } | |
| return reply.view('success'); | |
| }).catch(function (err) { | |
| return reply.view('error'); | |
| }); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment