diff --git a/application/modules/hsm/authenticate1.js b/application/modules/hsm/authenticate1.js index abdfcc7..ee81e24 100644 --- a/application/modules/hsm/authenticate1.js +++ b/application/modules/hsm/authenticate1.js @@ -142,33 +142,33 @@ const controller = async (req, res) => { await _sleep(10); } - if (_timeOut) { - let url = `http://${process.env.IP_HSM_SERVER_1}/feliqserver/v1/api/hsm/refresh`; - if (usingHSMNumber == 2) { - url = `http://${process.env.IP_HSM_SERVER_2}/feliqserver/v1/api/hsm/refresh`; - } - - let response = await axios({ - url: url, - method: 'get', - }); - - result = { - code: '5001', - message: 'Timeout', - data: {}, - }; - - // log warn - winston.logger.warn( - `${uniqueCode} [ RESPONSE LOADING-BALANCE TOPUP-1 ]: ${JSON.stringify( - result - )} and HSM refresh response ${response}` - ); - - return res.status(200).send(result); + // if (_timeOut) { + let url = `http://${process.env.IP_HSM_SERVER_1}/feliqserver/v1/api/hsm/refresh`; + if (usingHSMNumber == 2) { + url = `http://${process.env.IP_HSM_SERVER_2}/feliqserver/v1/api/hsm/refresh`; } + let response = await axios({ + url: url, + method: 'get', + }); + + result = { + code: '5001', + message: 'Timeout', + data: {}, + }; + + // log warn + winston.logger.warn( + `${uniqueCode} [ RESPONSE LOADING-BALANCE TOPUP-1 ]: ${JSON.stringify( + result + )} and HSM refresh response ${response}` + ); + + return res.status(200).send(result); + // } + _stopMessage = 0; transactionId[0] = respData[0];