From 31526a8227d8d218c538d504b02c6722b813f22c Mon Sep 17 00:00:00 2001 From: Alan Plum Date: Wed, 27 Jan 2016 17:22:39 +0100 Subject: [PATCH] Clean up templates --- js/server/modules/@arangodb/foxx/templates/main.js.tmpl | 2 +- js/server/modules/@arangodb/foxx/templates/router.js.tmpl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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(`