diff --git a/js/server/modules/org/arangodb/foxx/controller.js b/js/server/modules/org/arangodb/foxx/controller.js index b86e23d68e..bc599c95d7 100644 --- a/js/server/modules/org/arangodb/foxx/controller.js +++ b/js/server/modules/org/arangodb/foxx/controller.js @@ -148,13 +148,13 @@ extend(Controller.prototype, { //////////////////////////////////////////////////////////////////////////////// handleRequest: function (method, route, callback) { - var constraints = {queryParams: {}, urlParams: {}}, - newRoute = internal.constructRoute(method, route, callback, this, constraints), - requestContext = new RequestContext( - this.allRoutes, this.models, newRoute, this.rootElement, constraints, this.extensions - ), - summary, - undocumentedBody; + var constraints = {queryParams: {}, urlParams: {}}; + var newRoute = internal.constructRoute(method, route, callback, this, constraints); + var requestContext = new RequestContext( + this.allRoutes, this.models, newRoute, route, this.rootElement, constraints, this.extensions + ); + var summary; + var undocumentedBody; this.routingInfo.routes.push(newRoute); @@ -758,7 +758,6 @@ extend(Controller.prototype, { /// /// @endDocuBlock //////////////////////////////////////////////////////////////////////////////// - extend: function(extensions) { var attr; for (attr in extensions) { diff --git a/js/server/modules/org/arangodb/foxx/request_context.js b/js/server/modules/org/arangodb/foxx/request_context.js index 0f61547748..09a777e629 100644 --- a/js/server/modules/org/arangodb/foxx/request_context.js +++ b/js/server/modules/org/arangodb/foxx/request_context.js @@ -112,7 +112,8 @@ function validateOrThrow(raw, schema, allowInvalid) { /// Used for documenting and constraining the routes. //////////////////////////////////////////////////////////////////////////////// -function RequestContext(executionBuffer, models, route, rootElement, constraints, extensions) { +function RequestContext(executionBuffer, models, route, path, rootElement, constraints, extensions) { + this.path = path; this.route = route; this.typeToRegex = { "int": "/[0-9]+/",