knownasilya / hapi-decorators

Decorators for HapiJS routes

Home Page:http://knownasilya.github.io/hapi-decorators

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Decorator: @pre

knownasilya opened this issue · 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.