Wrap all middlewares from array
@param obj the object (controller exports)
@returns {Function|Array} the wrapped object
function wrap(obj) {
  if (_lodash2.default.isArray(obj)) {
    return obj.map(wrap);
  }
  return wrapRoute(obj);
}