tango-app-api-audit 3.6.0 → 3.6.2
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
|
@@ -393,7 +393,7 @@ export async function validation( req, res, next ) {
|
|
|
393
393
|
moduleType: { $eq: inputData.moduleType },
|
|
394
394
|
},
|
|
395
395
|
{
|
|
396
|
-
status: { $
|
|
396
|
+
status: { $in: [ 'inprogress' ] },
|
|
397
397
|
},
|
|
398
398
|
],
|
|
399
399
|
},
|
|
@@ -471,7 +471,8 @@ export async function isFeatureRunning( req, res, next ) {
|
|
|
471
471
|
{ term: { 'store_date.keyword': inputData.fileDate } },
|
|
472
472
|
{ term: { 'module.keyword': inputData.moduleType ==='track'? 'live_features_retrigger':'features_retrigger' } },
|
|
473
473
|
{ term: { 'zone_id.keyword': inputData.moduleType === 'zone'? inputData.zoneName :'traffic_zone' } },
|
|
474
|
-
{ term: { 'completed_st':
|
|
474
|
+
{ term: { 'completed_st': false } },
|
|
475
|
+
{ term: { 'initiated_st': true } },
|
|
475
476
|
],
|
|
476
477
|
},
|
|
477
478
|
},
|
|
@@ -479,9 +480,9 @@ export async function isFeatureRunning( req, res, next ) {
|
|
|
479
480
|
|
|
480
481
|
const getId = await getOpenSearchData( openSearch.tangoEyeLargeLogs, getQuery );
|
|
481
482
|
if ( getId?.body?.hits?.hits?.length > 0 ) {
|
|
482
|
-
|
|
483
|
+
return res.sendError( `This store is already being processed for the selected date. Please try again later.`, 400 );
|
|
483
484
|
} else {
|
|
484
|
-
|
|
485
|
+
next();
|
|
485
486
|
}
|
|
486
487
|
} catch ( error ) {
|
|
487
488
|
const err = error.message || 'Internal Server Error';
|