From 824f5dbaacfef8ad2c7ad7606b9e84760d3dd5b4 Mon Sep 17 00:00:00 2001 From: zadam Date: Thu, 7 Oct 2021 22:14:23 +0200 Subject: [PATCH] fix handling of string/empty responses --- src/routes/routes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/routes.js b/src/routes/routes.js index 6ffa5c8a0..f87b0cba1 100644 --- a/src/routes/routes.js +++ b/src/routes/routes.js @@ -107,7 +107,7 @@ function apiResultHandler(req, res, result) { function send(res, statusCode, response) { if (typeof response === 'string') { - res.status(statusCode, response); + res.status(statusCode).send(response); return response.length; }