From ec0a45db718c35d8bc298567ca64c9f9e9d480f5 Mon Sep 17 00:00:00 2001 From: Wesnydy Ribeiro Date: Mon, 3 Apr 2017 15:26:27 -0300 Subject: [PATCH] Adjust routes response --- translate-api/app.js | 4 ++-- translate-api/controllers/bundle.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/translate-api/app.js b/translate-api/app.js index 2a2f37d..4097c46 100755 --- a/translate-api/app.js +++ b/translate-api/app.js @@ -47,9 +47,9 @@ app.use(function(req, res, next) { /** * Register routes. */ -app.use('/', bundle); -app.use('/translate', translate); app.use('/video', video); +app.use('/translate', translate); +app.use('/', bundle); /** * Error handler. diff --git a/translate-api/controllers/bundle.js b/translate-api/controllers/bundle.js index e006a78..e55970d 100644 --- a/translate-api/controllers/bundle.js +++ b/translate-api/controllers/bundle.js @@ -23,7 +23,7 @@ exports.index=function(req, res, next) { amqp.receiveFromQueue(id, 'lists', false, res, function(err, message) { if (err) return error.internalError('An internal communication error has occurred.', next); - res.status(200).json(JSON.parse(message)); + res.status(200).send(message); }); }); }; -- libgit2 0.21.2