Commit 8d1d6eafae689255f918219a22f487f6d7fbc1fc

Authored by Nattapon Wongpaet
1 parent 50ad7d6d
Exists in master and in 1 other branch dev

stat customer and fix bug summary log

ais-structure/src/config/express.js
... ... @@ -271,7 +271,7 @@ module.exports = function () {
271 271 app.use( function( req, res, next ) {
272 272 // console.log("end");
273 273 // console.log(req.res.resBody);
274   - log.logSummary(req.res.resBody);
  274 + log.logSummary(JSON.parse(req.res.resBody));
275 275 } );
276 276  
277 277 return app;
... ...
ais-structure/src/modules/customer/customer.ctrl.js
... ... @@ -33,10 +33,12 @@ exports.customer = async function (req, res, next) {
33 33 {
34 34 if(resultObj.resultData && resultObj.resultData.length>0)
35 35 {
  36 + stats.receiveRestResponse(d01,"GET",sendCmd,"Success");
36 37 var response = responseMsg.success(req,getCmd,resultObj);
37 38 log.addSuccessSummary(sacf,sendCmd,response);
38 39 }else
39 40 {
  41 + stats.receiveRestResponse(d01,"GET",sendCmd,"Data Not Found");
40 42 var response = responseMsg.error(req,getCmd,40300);
41 43 log.addErrorSummary(sacf,sendCmd,response);
42 44 }
... ...