Skip to content

Instantly share code, notes, and snippets.

@i-van
Created February 29, 2016 16:51
Show Gist options
  • Save i-van/42a7c67578f4506544d5 to your computer and use it in GitHub Desktop.
Save i-van/42a7c67578f4506544d5 to your computer and use it in GitHub Desktop.
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