index.js
function bind(method, path, controller, action) {
    let handler = controllerRegistry[controller] && controllerRegistry[controller][action]
    if (!handler) {
      console.warn(`can't bind route ${ path } to unknown action ${ controller }.${ action }`)
      return
    }

    const policyName = LocalUtil.getPolicyName(policy, controller, action)
    let currentPolicy
    if (policyName) currentPolicy = policyRegistry[policyName]

    if (currentPolicy) {
      router[method](path, currentPolicy, handler)
    } else {
      router[method](path, handler)
    }
  }
function bind(method, path, controller, action) {
    let handler = controllerRegistry[controller] && controllerRegistry[controller][action]
    if (!handler) {
      console.warn(`can't bind route ${ path } to unknown action ${ controller }.${ action }`)
      return
    }

    const policyName = LocalUtil.getPolicyName(policy, controller, action)
    let currentPolicy
    if (policyName) currentPolicy = policyRegistry[policyName]

    if (currentPolicy) {
      router[method](path, currentPolicy, handler)
    } else {
      router[method](path, handler)
    }
  }
function bind ( method , path , controller , action ) { let handler = controllerRegistry [ controller ] && controllerRegistry [ controller ] [ action ] if ( ! handler ) { console . warn ( ` ${ path } ${ controller } ${ action } ` ) return } const policyName = LocalUtil . getPolicyName ( policy , controller , action ) let currentPolicy if ( policyName ) currentPolicy = policyRegistry [ policyName ] if ( currentPolicy ) { router [ method ] ( path , currentPolicy , handler ) } else { router [ method ] ( path , handler ) } }
bind path to controller & action
bind path to controller & action