Made a new Foxx app with the Web UI and added the following route:
controller.get('/names/:name', function (request, response) {
var name = request.params('name');
response.json(db._query(
"FOR x IN collection"+
" FILTER x.name == " + name +
" RETURN x"
).toArray());
})
.pathParam('name', { // line 112
description: 'A name value to search for',
type: 'String'
})
.errorResponse(ArangoError, 404, 'Data not found');
Which gives an error pointing to line 112 and prevents the app from running:
This runs fine if the .pathParam
function is removed.
How can I fix this/what am I doing wrong? I'm using a fresh install with version 2.6.9 (latest)