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

Pre is not a function

Open kesmile opened this issue 7 years ago • 0 comments

When I use github repository I don't have problem using the decorator pre, but whe I use from npm I have this problem:

image

My code:

  @route('delete','/{id}')
  @pre([{ method:  Acl.getAuthorization, assign: 'ROUTES'}])
  @validate({
    params:{
      id: Joi.number().integer().required()
    }
  })
  @config({
    app:{
      permission: { section:'ROUTES', position: 'list' }
    },
    auth: 'jwt'
  })
  deleteRoute(req, reply){}

kesmile avatar Jan 26 '18 23:01 kesmile