From f97c9e6c6629b701d48e600073aef733857c42a0 Mon Sep 17 00:00:00 2001 From: Mohamad Ihsan Date: Mon, 3 Jul 2023 12:54:29 +0700 Subject: [PATCH] update bug fixing response data card history --- application/modules/history/history.controller.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/modules/history/history.controller.js b/application/modules/history/history.controller.js index 4c7f6e3..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; @@ -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: [], }); } };