tango-app-api-audit 3.4.3 → 3.4.4

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-app-api-audit",
3
- "version": "3.4.3",
3
+ "version": "3.4.4",
4
4
  "description": "audit & audit metrics apis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1467,7 +1467,7 @@ export async function save( req, res ) {
1467
1467
  },
1468
1468
  );
1469
1469
  const sqsProduceQueue = {
1470
- QueueUrl: ( auditConfig?.isCheckMinAfterCount ==1 && auditConfig?.minAfterCount ) >1500? `${sqs.url}${sqs.feature_new}`: `${sqs.url}${sqs.feature}`,
1470
+ QueueUrl: ( auditConfig?.isCheckMinAfterCount ==1 && inputData.customerCount > auditConfig?.minAfterCount ) ? `${sqs.url}${sqs.feature_new}`: `${sqs.url}${sqs.feature}`,
1471
1471
  MessageBody: JSON.stringify( {
1472
1472
  store_id: inputData.storeId,
1473
1473
  store_date: inputData.fileDate,
@@ -4568,6 +4568,7 @@ export async function auditViewLogs( req, res ) {
4568
4568
  },
4569
4569
  };
4570
4570
  const logs = await getOpenSearchData( parsedOpenSearch.auditLog, logsQuery );
4571
+ logger.info( { logs: logs.body.hits, inputData: inputData, auditLog: parsedOpenSearch.auditLog } );
4571
4572
  if ( logs.body.hits.hits.length > 0 ) {
4572
4573
  if ( logs.body.hits.hits[0]._source.logSubType == 'auditDone' ) {
4573
4574
  const convertedTime = await convertTimestampToDateTime( logs.body.hits.hits[0]._source.logData.endTime );