hapi-decorators icon indicating copy to clipboard operation
hapi-decorators copied to clipboard

Decorator: @pre

Open knownasilya opened this issue 9 years ago • 0 comments

Calls a method before the current one.

@pre('fetchUsers')
@pre('fetchUser', {
  assign: 'user',
  failAction: 'error'
})
@pre([
  // hapijs pre array config
])

Still wondering how far I should take this one, and if I should try to keep it simple, or take it in a different direction then the Hapi version.

knownasilya avatar Sep 01 '15 22:09 knownasilya