tango-app-api-audit 3.5.58 → 3.5.59
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
|
@@ -363,7 +363,6 @@ export async function getAuditFile( req, res ) {
|
|
|
363
363
|
temp.functionName='audit-controller-getAuditFile';
|
|
364
364
|
temp.messageType = 'log';
|
|
365
365
|
temp.message ='Hit in drafted file';
|
|
366
|
-
msg = JSON.parse( consumer );
|
|
367
366
|
temp.storeId =userDetails[0].storeId;
|
|
368
367
|
temp.fileDate =userDetails[0].fileDate;
|
|
369
368
|
temp.totalCount =userDetails[0].beforeCount;
|
|
@@ -864,18 +863,18 @@ export async function getAuditFile( req, res ) {
|
|
|
864
863
|
} catch ( error ) {
|
|
865
864
|
/* openSearch logs start*/
|
|
866
865
|
const id = `${req.query.moduleType}_${req.query.queueName}_getAuditFile_Error_${req?.user?.userEmail}_${Date.now()}`;
|
|
867
|
-
let temp =
|
|
866
|
+
let temp = req.query;
|
|
868
867
|
temp.logType='audit';
|
|
869
868
|
temp.logSubType='get-audit-file';
|
|
870
869
|
temp.functionName='audit-controller-getAuditFile';
|
|
871
870
|
temp.messageType = 'error';
|
|
872
871
|
temp.message =error.message || 'Internal Server Error';
|
|
873
|
-
temp.storeId =msg?.store_id;
|
|
874
|
-
temp.fileDate =msg?.curr_date;
|
|
875
|
-
temp.totalCount =msg?.total_count;
|
|
876
|
-
temp.zoneName =msg?.zone_id;
|
|
877
|
-
temp.auditType = msg?.audit_type;
|
|
878
|
-
temp.indexName= msg?.index_name;
|
|
872
|
+
// temp.storeId =msg?.store_id;
|
|
873
|
+
// temp.fileDate =msg?.curr_date;
|
|
874
|
+
// temp.totalCount =msg?.total_count;
|
|
875
|
+
// temp.zoneName =msg?.zone_id;
|
|
876
|
+
// temp.auditType = msg?.audit_type;
|
|
877
|
+
// temp.indexName= msg?.index_name;
|
|
879
878
|
await openSearchLog( temp, req.user, id );
|
|
880
879
|
/* openSearch logs end*/
|
|
881
880
|
logger.error( {
|
|
@@ -443,7 +443,7 @@ export async function openSearchLog( inputData, user, id ) {
|
|
|
443
443
|
auditType: inputData.auditType || '',
|
|
444
444
|
folderPath: inputData.folderPath || '',
|
|
445
445
|
params: inputData.params||'',
|
|
446
|
-
|
|
446
|
+
|
|
447
447
|
},
|
|
448
448
|
createdAt: new Date(),
|
|
449
449
|
updatedAt: new Date(),
|
|
@@ -452,7 +452,7 @@ export async function openSearchLog( inputData, user, id ) {
|
|
|
452
452
|
await insertWithId( openSearch.auditedLogs, id, logs );
|
|
453
453
|
return true;
|
|
454
454
|
} catch ( error ) {
|
|
455
|
-
logger.error( { error: error, message: { logs:
|
|
455
|
+
logger.error( { error: error, message: { logs: inputData, id: id }, function: 'openSearchLog-audit.validation' } );
|
|
456
456
|
return false;
|
|
457
457
|
}
|
|
458
458
|
}
|