lib/hook.js
function _getMiddlewareForShadowRoute (controllerId, blueprintId) {

        // Allow custom actions defined in controller to override blueprint actions.
        return sails.middleware.controllers[controllerId][blueprintId.toLowerCase()] || hook.middleware[blueprintId.toLowerCase()];
      }
function _getMiddlewareForShadowRoute (controllerId, blueprintId) {

        // Allow custom actions defined in controller to override blueprint actions.
        return sails.middleware.controllers[controllerId][blueprintId.toLowerCase()] || hook.middleware[blueprintId.toLowerCase()];
      }
function _getMiddlewareForShadowRoute ( controllerId , blueprintId ) { // Allow custom actions defined in controller to override blueprint actions. return sails . middleware . controllers [ controllerId ] [ blueprintId . toLowerCase ( ) ] || hook . middleware [ blueprintId . toLowerCase ( ) ] ; }
Return the middleware function that should be bound for a shadow route
pointing to the specified blueprintId. Will use the explicit controller
action if it exists, otherwise the blueprint action.

@param  {String} controllerId
@param  {String} blueprintId  [find, create, etc.]
@return {Function}            [middleware]
Return the middleware function that should be bound for a shadow route pointing to the specified blueprintId . Will use the explicit controller action if it exists otherwise the blueprint action .