From c885c499253713ce45869c8cddcb758b95fe322f Mon Sep 17 00:00:00 2001 From: Mohamad Ihsan Date: Mon, 3 Jul 2023 12:53:16 +0700 Subject: [PATCH 1/2] update bug fixing response data card history --- application/modules/history/history.controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/modules/history/history.controller.js b/application/modules/history/history.controller.js index 4c7f6e3..c63f8f1 100644 --- a/application/modules/history/history.controller.js +++ b/application/modules/history/history.controller.js @@ -58,7 +58,7 @@ const cardHistory = async (req, res) => { result = { code: '400', message: err.errors[0].msg, - data: {}, + data: [], }; // log warn @@ -178,7 +178,7 @@ const cardHistory = async (req, res) => { process.env.NODE_ENV != 'production' ? error.message : '500 internal server error - backend server.', - data: {}, + data: [], }); } }; From 920284f07d9eca04a71e7401276c0ef557e0af08 Mon Sep 17 00:00:00 2001 From: Mohamad Ihsan Date: Mon, 3 Jul 2023 12:55:47 +0700 Subject: [PATCH 2/2] update bug fixing response data card history --- application/modules/history/history.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/modules/history/history.controller.js b/application/modules/history/history.controller.js index c63f8f1..db68054 100644 --- a/application/modules/history/history.controller.js +++ b/application/modules/history/history.controller.js @@ -42,7 +42,7 @@ const cardHistory = async (req, res) => { // generate unique code // unique code ini digunakan untuk keperluan log agar mudah untuk dibaca let uniqueCode = await helper.getUniqueCode(); - let result = {}; + let result = []; // param let { data } = req.body;