tango-app-api-audit 3.5.59 → 3.5.60
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
|
@@ -275,7 +275,7 @@ export async function getAuditFile( req, res ) {
|
|
|
275
275
|
const userAssign = await aggregateAssignAudit( query );
|
|
276
276
|
if ( userAssign.length > 0 ) {
|
|
277
277
|
// openSearch log
|
|
278
|
-
const id = `${req.query.moduleType}_${req.query.queueName}_getAuditFile_Info_${req?.user?.
|
|
278
|
+
const id = `${req.query.moduleType}_${req.query.queueName}_getAuditFile_Info_${req?.user?.email}_${Date.now()}`;
|
|
279
279
|
let temp = inputData;
|
|
280
280
|
temp.logType='audit';
|
|
281
281
|
temp.logSubType='get-audit-file';
|
|
@@ -321,7 +321,7 @@ export async function getAuditFile( req, res ) {
|
|
|
321
321
|
/* openSearch logs start*/
|
|
322
322
|
|
|
323
323
|
// declare basic details
|
|
324
|
-
const id = `${req.query.moduleType}_${req.query.queueName}_getAuditFile_Info_${req?.user?.
|
|
324
|
+
const id = `${req.query.moduleType}_${req.query.queueName}_getAuditFile_Info_${req?.user?.email}_${Date.now()}`;
|
|
325
325
|
let temp = inputData;
|
|
326
326
|
temp.logType='audit';
|
|
327
327
|
temp.logSubType='get-audit-file';
|
|
@@ -356,7 +356,7 @@ export async function getAuditFile( req, res ) {
|
|
|
356
356
|
case 'drafted':
|
|
357
357
|
logger.info( 'userDetails drafted', { inputData } );
|
|
358
358
|
/* openSearch logs start */
|
|
359
|
-
const id = `${req.query.moduleType}_${req.query.queueName}_getAuditFile_Info_${req?.user?.
|
|
359
|
+
const id = `${req.query.moduleType}_${req.query.queueName}_getAuditFile_Info_${req?.user?.email}_${Date.now()}`;
|
|
360
360
|
let temp = inputData;
|
|
361
361
|
temp.logType='audit';
|
|
362
362
|
temp.logSubType='get-audit-file';
|
|
@@ -475,7 +475,7 @@ export async function getAuditFile( req, res ) {
|
|
|
475
475
|
}
|
|
476
476
|
if ( msg.audit_type === 'ReAudit' && msg.zone_id !== 'track' ) {
|
|
477
477
|
/* openSearch logs start */
|
|
478
|
-
const id = `${req.query.moduleType}_${req.query.queueName}_getAuditFile_Info_${req?.user?.
|
|
478
|
+
const id = `${req.query.moduleType}_${req.query.queueName}_getAuditFile_Info_${req?.user?.email}_${Date.now()}`;
|
|
479
479
|
let temp = inputData;
|
|
480
480
|
temp.logType='audit';
|
|
481
481
|
temp.logSubType='get-audit-file';
|
|
@@ -668,7 +668,7 @@ export async function getAuditFile( req, res ) {
|
|
|
668
668
|
};
|
|
669
669
|
logger.info( { fetchData: fetchData, msg: msg, inputData: inputData, type: 'debug-bucketNameIssue' } );
|
|
670
670
|
/* openSearch logs start */
|
|
671
|
-
const _id = `${req.query.moduleType}_${req.query.queueName}_getAuditFile_Info_${req?.user?.
|
|
671
|
+
const _id = `${req.query.moduleType}_${req.query.queueName}_getAuditFile_Info_${req?.user?.email}_${Date.now()}`;
|
|
672
672
|
let temp = inputData;
|
|
673
673
|
temp.logType='audit';
|
|
674
674
|
temp.logSubType='get-audit-file';
|
|
@@ -789,7 +789,7 @@ export async function getAuditFile( req, res ) {
|
|
|
789
789
|
insertData = userDetails[0];
|
|
790
790
|
} else {
|
|
791
791
|
/* openSearch logs start*/
|
|
792
|
-
const id = `${req.query.moduleType}_${req.query.queueName}_getAuditFile_Error_${req?.user?.
|
|
792
|
+
const id = `${req.query.moduleType}_${req.query.queueName}_getAuditFile_Error_${req?.user?.email}_${Date.now()}`;
|
|
793
793
|
let temp = inputData;
|
|
794
794
|
temp.logType='audit';
|
|
795
795
|
temp.logSubType='get-audit-file';
|
|
@@ -862,7 +862,7 @@ export async function getAuditFile( req, res ) {
|
|
|
862
862
|
} );
|
|
863
863
|
} catch ( error ) {
|
|
864
864
|
/* openSearch logs start*/
|
|
865
|
-
const id = `${req.query.moduleType}_${req.query.queueName}_getAuditFile_Error_${req?.user?.
|
|
865
|
+
const id = `${req.query.moduleType}_${req.query.queueName}_getAuditFile_Error_${req?.user?.email}_${Date.now()}`;
|
|
866
866
|
let temp = req.query;
|
|
867
867
|
temp.logType='audit';
|
|
868
868
|
temp.logSubType='get-audit-file';
|
|
@@ -902,7 +902,7 @@ export async function getFilterData( msg, user ) {
|
|
|
902
902
|
const mappingFile = await getJsonFileData( params );
|
|
903
903
|
if ( mappingFile.statusCode ) {
|
|
904
904
|
/* openSearch logs start*/
|
|
905
|
-
const id = `${msg.store_id}_${msg.zone_id}_${msg.curr_date}_${bucket.masterJsonFile}_getFilterData_Error_${user?.
|
|
905
|
+
const id = `${msg.store_id}_${msg.zone_id}_${msg.curr_date}_${bucket.masterJsonFile}_getFilterData_Error_${user?.email}_${Date.now()}`;
|
|
906
906
|
let temp = msg;
|
|
907
907
|
temp.logType='audit';
|
|
908
908
|
temp.logSubType='get-audit-file';
|
|
@@ -934,7 +934,7 @@ export async function getFilterData( msg, user ) {
|
|
|
934
934
|
}
|
|
935
935
|
} catch ( error ) {
|
|
936
936
|
/* openSearch logs start*/
|
|
937
|
-
const id = `${msg.store_id}_${msg.zone_id}_${msg.curr_date}_${bucket.masterJsonFile}_getFilterData_Error_${user?.
|
|
937
|
+
const id = `${msg.store_id}_${msg.zone_id}_${msg.curr_date}_${bucket.masterJsonFile}_getFilterData_Error_${user?.email}_${Date.now()}`;
|
|
938
938
|
let temp = msg;
|
|
939
939
|
temp.logType='audit';
|
|
940
940
|
temp.logSubType='get-audit-file';
|
|
@@ -971,7 +971,7 @@ export async function getAuditImage( msg, user ) {
|
|
|
971
971
|
const folderPath = await listFileWithoutLimit( fetchData );
|
|
972
972
|
if ( folderPath.statusCode == 404 ) {
|
|
973
973
|
/* openSearch logs start */
|
|
974
|
-
const id = `${fileDate}_${storeId}_${msg.zone_id}_${bucket.auditInput}_getAuditImage_Error_${user?.
|
|
974
|
+
const id = `${fileDate}_${storeId}_${msg.zone_id}_${bucket.auditInput}_getAuditImage_Error_${user?.email}_${Date.now()}`;
|
|
975
975
|
let temp = msg;
|
|
976
976
|
temp.logType='audit';
|
|
977
977
|
temp.logSubType='get-audit-file';
|
|
@@ -1020,7 +1020,7 @@ export async function getAuditImage( msg, user ) {
|
|
|
1020
1020
|
}
|
|
1021
1021
|
} catch ( error ) {
|
|
1022
1022
|
/* openSearch logs start*/
|
|
1023
|
-
const id = `${fileDate}_${storeId}_${msg.zone_id}_${bucket.auditInput}_getAuditImage_Error_${user?.
|
|
1023
|
+
const id = `${fileDate}_${storeId}_${msg.zone_id}_${bucket.auditInput}_getAuditImage_Error_${user?.email}_${Date.now()}`;
|
|
1024
1024
|
let temp = msg;
|
|
1025
1025
|
temp.logType='audit';
|
|
1026
1026
|
temp.logSubType='get-audit-file';
|
|
@@ -1597,7 +1597,7 @@ export async function save( req, res ) {
|
|
|
1597
1597
|
|
|
1598
1598
|
if ( fileData?.statusCode ) {
|
|
1599
1599
|
/* openSearch logs start*/
|
|
1600
|
-
const id = `${inputData.moduleType}_${inputData.auditId}_${inputData.storeId}_${inputData.moduleType}_${inputData.auditType}_save_Error_${req?.user?.
|
|
1600
|
+
const id = `${inputData.moduleType}_${inputData.auditId}_${inputData.storeId}_${inputData.moduleType}_${inputData.auditType}_save_Error_${req?.user?.email}_${Date.now()}`;
|
|
1601
1601
|
let temp = inputData;
|
|
1602
1602
|
temp.logType='audit';
|
|
1603
1603
|
temp.logSubType='get-audit-file';
|
|
@@ -1648,7 +1648,7 @@ export async function save( req, res ) {
|
|
|
1648
1648
|
|
|
1649
1649
|
if ( mappingUpload?.statusCode ) {
|
|
1650
1650
|
/* openSearch logs start*/
|
|
1651
|
-
const id = `${inputData.moduleType}_${inputData.auditId}_${inputData.storeId}_${inputData.moduleType}_${inputData.auditType}_save_Error_${req?.user?.
|
|
1651
|
+
const id = `${inputData.moduleType}_${inputData.auditId}_${inputData.storeId}_${inputData.moduleType}_${inputData.auditType}_save_Error_${req?.user?.email}_${Date.now()}`;
|
|
1652
1652
|
let temp = inputData;
|
|
1653
1653
|
temp.logType='audit';
|
|
1654
1654
|
temp.logSubType='get-audit-file';
|
|
@@ -2054,7 +2054,7 @@ export async function save( req, res ) {
|
|
|
2054
2054
|
await insertOpenSearchData( openSearch.auditLog, logData );
|
|
2055
2055
|
} else {
|
|
2056
2056
|
/* openSearch logs start*/
|
|
2057
|
-
let id = `${inputData.moduleType}_${inputData.auditId}_${inputData.storeId}_${inputData.moduleType}_${inputData.auditType}_save_Info_${req?.user?.
|
|
2057
|
+
let id = `${inputData.moduleType}_${inputData.auditId}_${inputData.storeId}_${inputData.moduleType}_${inputData.auditType}_save_Info_${req?.user?.email}_${Date.now()}`;
|
|
2058
2058
|
let temp = inputData;
|
|
2059
2059
|
temp.logType='audit';
|
|
2060
2060
|
temp.logSubType='get-audit-file';
|
|
@@ -2150,7 +2150,7 @@ export async function save( req, res ) {
|
|
|
2150
2150
|
|
|
2151
2151
|
);
|
|
2152
2152
|
/* openSearch logs start */
|
|
2153
|
-
id = `${inputData.moduleType}_${inputData.auditId}_${inputData.storeId}_${inputData.moduleType}_${inputData.auditType}_save_Info_${req?.user?.
|
|
2153
|
+
id = `${inputData.moduleType}_${inputData.auditId}_${inputData.storeId}_${inputData.moduleType}_${inputData.auditType}_save_Info_${req?.user?.email}_${Date.now()}`;
|
|
2154
2154
|
const message = {
|
|
2155
2155
|
getBody: getBody,
|
|
2156
2156
|
streams: streams,
|
|
@@ -2162,7 +2162,7 @@ export async function save( req, res ) {
|
|
|
2162
2162
|
/* openSearch logs end */
|
|
2163
2163
|
if ( inputData.moduleType === 'track' ) {
|
|
2164
2164
|
// declare id
|
|
2165
|
-
id = `${inputData.moduleType}_${inputData.auditId}_${inputData.storeId}_${inputData.moduleType}_${inputData.auditType}_save_Info_${req?.user?.
|
|
2165
|
+
id = `${inputData.moduleType}_${inputData.auditId}_${inputData.storeId}_${inputData.moduleType}_${inputData.auditType}_save_Info_${req?.user?.email}_${Date.now()}`;
|
|
2166
2166
|
const query =
|
|
2167
2167
|
{
|
|
2168
2168
|
module: 'REID-TRACKER-V1',
|
|
@@ -10,7 +10,7 @@ export async function isExistsQueue( req, res, next ) {
|
|
|
10
10
|
const isExist = await getQueueUrl( inputData.queueName );
|
|
11
11
|
if ( isExist.statusCode ) {
|
|
12
12
|
/* openSearch logs start */
|
|
13
|
-
const id = `${inputData.moduleType}_${inputData.queueName}_isExistsQueue_Error_${req?.user?.
|
|
13
|
+
const id = `${inputData.moduleType}_${inputData.queueName}_isExistsQueue_Error_${req?.user?.email}_${Date.now()}`;
|
|
14
14
|
let temp = inputData;
|
|
15
15
|
temp.logType='audit';
|
|
16
16
|
temp.logSubType='get-audit-file';
|
|
@@ -25,7 +25,7 @@ export async function isExistsQueue( req, res, next ) {
|
|
|
25
25
|
}
|
|
26
26
|
} catch ( error ) {
|
|
27
27
|
/* openSearch logs start */
|
|
28
|
-
const id = `${req.query.moduleType}_${req.query.queueName}_isExistsQueue_Error_${req?.user?.
|
|
28
|
+
const id = `${req.query.moduleType}_${req.query.queueName}_isExistsQueue_Error_${req?.user?.email}_${Date.now()}`;
|
|
29
29
|
let temp = req.query;
|
|
30
30
|
temp.logType='audit';
|
|
31
31
|
temp.logSubType='get-audit-file';
|