Commit f9f2c679b4bc5b94ab5d46c0658de5eef9cbdd48

Authored by Nattapon Wongpaet
1 parent 79d9e534
Exists in master and in 1 other branch dev

fix bug

ais-structure/src/modules/customer/postCustomer.ctrl.js
... ... @@ -65,7 +65,7 @@ exports.postCustomer = async function (req, res, next){
65 65 }
66 66 }
67 67  
68   - log.logDetail.addOutput(req.body.clientName,getCmd,constant.RESPONSE,response,response);
  68 + log.logDetail.addOutput(req.body.clientName,method+"_"+getCmd,constant.RESPONSE,response,response);
69 69 res.status(200).json(response);
70 70 next();
71 71 };
... ...
ais-structure/src/modules/helper/connection.js
... ... @@ -183,9 +183,11 @@ connection.requestJsonToD01 = async function (obj,cmd,myMethod) {
183 183  
184 184 var resultRes = await asyncRequest(params,objectData,funStats);
185 185  
186   - if(resultRes.response)
  186 + if(resultRes.response){
187 187 result.response = JSON.parse(resultRes.body);
188   -
  188 + } else {
  189 + result = resultRes;
  190 + }
189 191 }
190 192  
191 193 // console.log(result);
... ...