Created
February 29, 2016 16:51
-
-
Save i-van/42a7c67578f4506544d5 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
| class Controller { | |
| @route('get', '/index') | |
| @middleware('load_user') | |
| async index() { | |
| let user = await User.get() | |
| , value = await user.doSomething(); | |
| if (!value) { | |
| throw new Error('Some Error'); | |
| } | |
| return user; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment