From 751191e10ea2cebda3ed139e83e0fa838c024e8f Mon Sep 17 00:00:00 2001 From: Mohamad Ihsan Date: Fri, 19 May 2023 15:20:00 +0700 Subject: [PATCH] debug 2 --- application/modules/loadbalance/loadbalance.model.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/application/modules/loadbalance/loadbalance.model.js b/application/modules/loadbalance/loadbalance.model.js index 34f3b80..0760734 100644 --- a/application/modules/loadbalance/loadbalance.model.js +++ b/application/modules/loadbalance/loadbalance.model.js @@ -862,14 +862,18 @@ const getLastHistory = (cardNumber) => { // INSERT FRAUD TRANSACTION const insertFraudTransaction = (reservationNumber) => { - let rsv = ``; + let rsv = ''; if (reservationNumber.length > 0) { for (let index = 0; index < reservationNumber.length; index++) { if (index > 0) { - rsv = rsv + `,`; + rsv = rsv + ','; } - rsv = `'` + rsv + reservationNumber[index] + `'`; + if (index == 0) { + rsv = "'" + reservationNumber[index] + "'"; + } else { + rsv = "'" + rsv + reservationNumber[index] + "'"; + } } }