tango-app-api-analysis-traffic 3.8.1-alpha.7 → 3.8.1-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -272,24 +272,28 @@ export async function footFallImages( req, res ) {
|
|
|
272
272
|
],
|
|
273
273
|
},
|
|
274
274
|
},
|
|
275
|
-
'_source': [ 'dateString', 'storeId', 'duplicateCount', 'footfallCount', 'employeeCount', '
|
|
275
|
+
'_source': [ 'dateString', 'storeId', 'duplicateCount', 'footfallCount', 'employeeCount', 'houseKeepingCount', 'status', 'ticketId', 'comments', 'userName', 'role' ],
|
|
276
276
|
|
|
277
277
|
};
|
|
278
278
|
|
|
279
279
|
const getData = await getOpenSearchData( opensearch.footfallDirectory, query );
|
|
280
|
-
const ticketDetails = getData?.body?.hits?.hits;
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
280
|
+
const ticketDetails = getData?.body?.hits?.hits[0];
|
|
281
|
+
let temp = [];
|
|
282
|
+
ticketDetails?._source? temp.push( ticketDetails?._source ) :null;
|
|
283
|
+
if ( ticketDetails?._source?.status == 'close' ) {
|
|
284
|
+
temp.push( ticketDetails?._source );
|
|
285
|
+
}
|
|
286
|
+
const LamdaURL = 'https://cncmzszloku7y3bewxbpiy6nkm0yunqe.lambda-url.ap-south-1.on.aws/';
|
|
287
|
+
let resultData = await LamdaServiceCall( LamdaURL, inputData );
|
|
288
|
+
if ( resultData ) {
|
|
289
|
+
if ( resultData.status_code == '200' ) {
|
|
290
|
+
return res.sendSuccess( { ...resultData, ticketStatus: temp?.length > 0? temp : null, config: req?.store?.revopTagging } );
|
|
291
|
+
} else {
|
|
292
|
+
return res.sendError( 'No Content', 204 );
|
|
293
|
+
}
|
|
294
|
+
} else {
|
|
295
|
+
return res.sendError( 'No Content', 204 );
|
|
296
|
+
}
|
|
293
297
|
} catch ( error ) {
|
|
294
298
|
logger.error( { message: error, data: req.query, function: 'storeProcessedData' } );
|
|
295
299
|
const err = error.message || 'Internal Server Error';
|