From 48919a95d9cc74c3dd857d27eec06456903bfe83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Y=C3=BBki=20Vachot?= Date: Fri, 10 Dec 2021 09:47:44 +0100 Subject: [PATCH] Update: Error response --- app-backend/config/response.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app-backend/config/response.config.js b/app-backend/config/response.config.js index 4278756..dfca2db 100644 --- a/app-backend/config/response.config.js +++ b/app-backend/config/response.config.js @@ -3,7 +3,7 @@ function sendMessage (res, successCode, data, token=null) { } function sendError (res, statusCode, errorCode, reason, token=null) { - res.status(statusCode).json({ status: 'error', errorCode: errorCode, data: { token: token, reason: reason }}); + res.status(statusCode).json({ status: 'error', errorCode: errorCode, token: token, reason: reason}); } module.exports = { sendMessage, sendError };