tango-app-api-analysis-traffic 3.5.0-alpha.3 → 3.5.0-alpha.5

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-analysis-traffic",
3
- "version": "3.5.0-alpha.3",
3
+ "version": "3.5.0-alpha.5",
4
4
  "description": "Traffic Analysis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -2124,10 +2124,10 @@ export const checkTodayReportStatus = async ( req, res ) => {
2124
2124
 
2125
2125
  if ( dayjs( reqdata.toDate ).format( 'YYYY-MM-DD' ) === yesterday ) {
2126
2126
  let mustConditions = [
2127
- { match: { logType: 'report' } },
2128
- { match: { logSubType: 'sendReport' } },
2129
- { match: { 'logData.clientId': clientId } },
2130
- { match: { 'logData.fileDate': dayjs( yesterday ).format( 'DD-MM-YYYY' ) } },
2127
+ { term: { 'logType.keyword': 'report' } },
2128
+ { term: { 'logSubType.keyword': 'sendReport' } },
2129
+ { term: { 'logData.clientId.keyword': clientId } },
2130
+ { term: { 'logData.fileDate.keyword': dayjs( yesterday ).format( 'DD-MM-YYYY' ) } },
2131
2131
  ];
2132
2132
 
2133
2133
  let query = {
@@ -2139,6 +2139,9 @@ export const checkTodayReportStatus = async ( req, res ) => {
2139
2139
 
2140
2140
  let auditIndexName = JSON.parse( process.env.OPENSEARCH ).prodAuditLog;
2141
2141
  let result = await getOpenSearchData( auditIndexName, query );
2142
+ // console.log( 'mustConditions =>', mustConditions );
2143
+ // console.log( 'result =>', result );
2144
+ // console.log( 'result.body.hits =>', result.body.hits );
2142
2145
  resultData.reportSendStatus = !( result && result.body && result.body.hits && result.body.hits.hits.length > 0 );
2143
2146
  } else {
2144
2147
  resultData.reportSendStatus = false;