function _getMiddlewareForShadowRoute(controllerId, blueprintId) {

        // Allow custom actions defined in controller to override blueprint actions.
        return sails.middleware.controllers[controllerId][blueprintId.toLowerCase()] || hook.middleware[blueprintId];
      }
/**
       * 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.

@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 . @param { String } controllerId @param { String } blueprintId [ find create etc . ] @return { Function } [ middleware ]
function _getMiddlewareForShadowRoute(controllerId, blueprintId) {
        return sails.middleware.controllers[controllerId][blueprintId.toLowerCase()] || hook.middleware[blueprintId];
      }
function _getMiddlewareForShadowRoute ( controllerId , blueprintId ) { return sails . middleware . controllers [ controllerId ] [ blueprintId . toLowerCase ( ) ] || hook . middleware [ blueprintId ] ; }
Return the middleware function that should be bound for a shadow route
 pointing to the specified blueprintId.
Return the middleware function that should be bound for a shadow route pointing to the specified blueprintId .
// Allow custom actions defined in controller to override blueprint actions.