diff --git a/js/server/modules/@arangodb/foxx/templates/main.js.tmpl b/js/server/modules/@arangodb/foxx/templates/main.js.tmpl index ecfd1ad518..74b492a918 100644 --- a/js/server/modules/@arangodb/foxx/templates/main.js.tmpl +++ b/js/server/modules/@arangodb/foxx/templates/main.js.tmpl @@ -1,3 +1,3 @@ 'use strict'; <% _.each(routePaths, function (path) { %> -module.context.use('/<%= path %>', require('./routes/<%= path %>'));<% }); %> \ No newline at end of file +module.context.use('/<%= path %>', require('./routes/<%= path %>'));<% }); %> diff --git a/js/server/modules/@arangodb/foxx/templates/router.js.tmpl b/js/server/modules/@arangodb/foxx/templates/router.js.tmpl index 6d1b45aa0e..8aa15489f4 100644 --- a/js/server/modules/@arangodb/foxx/templates/router.js.tmpl +++ b/js/server/modules/@arangodb/foxx/templates/router.js.tmpl @@ -43,10 +43,11 @@ router.post(function (req, res) { throw e; } _.extend(<%= document %>, meta); + res.status(201); res.send(<%= document %>); }) .body(<%= model %>, 'The <%= document %> to create.') -.response(<%= model %>, 'The created <%= document %>.') +.response(201, <%= model %>, 'The created <%= document %>.') .error(HTTP_CONFLICT, 'The <%= document %> already exists.') .summary('Create a new <%= document %>') .description(`