tango-app-api-audit 3.5.12 → 3.5.13
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.5.
|
|
3
|
+
"version": "3.5.13",
|
|
4
4
|
"description": "audit & audit metrics apis",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"mongodb": "^6.7.0",
|
|
27
27
|
"nodemon": "^3.1.3",
|
|
28
28
|
"swagger-ui-express": "^5.0.1",
|
|
29
|
-
"tango-api-schema": "^2.2.
|
|
30
|
-
"tango-app-api-middleware": "^3.1.
|
|
29
|
+
"tango-api-schema": "^2.2.197",
|
|
30
|
+
"tango-app-api-middleware": "^3.1.87",
|
|
31
31
|
"winston": "^3.13.0",
|
|
32
32
|
"winston-daily-rotate-file": "^5.0.0"
|
|
33
33
|
},
|
|
@@ -1127,6 +1127,29 @@ export async function saveBinary( req, res ) {
|
|
|
1127
1127
|
if ( updatDataunattended.modifiedCount==0 ) {
|
|
1128
1128
|
return res.sendError( 'Update failed, it may be invalid request', 400 );
|
|
1129
1129
|
}
|
|
1130
|
+
const getQuery = {
|
|
1131
|
+
storeId: inputData.storeId,
|
|
1132
|
+
fileDate: inputData.fileDate,
|
|
1133
|
+
tempId: inputData.tempId,
|
|
1134
|
+
moduleType: inputData.moduleType,
|
|
1135
|
+
};
|
|
1136
|
+
const getupdatedData = await findOneBinaryAudit( getQuery );
|
|
1137
|
+
const getTraxInsertData = await findOneTraxAuditData( getQuery, { sqs: 1 } );
|
|
1138
|
+
const OpenSearchOutput = {
|
|
1139
|
+
clientId: getupdatedData?.clientId,
|
|
1140
|
+
storeId: getupdatedData?.storeId,
|
|
1141
|
+
moduleType: getupdatedData?.moduleType,
|
|
1142
|
+
fileDate: getupdatedData?.fileDate,
|
|
1143
|
+
auditStatus: getupdatedData?.auditStatus,
|
|
1144
|
+
questionType: getupdatedData?.questionType,
|
|
1145
|
+
Answer: getupdatedData?.answer,
|
|
1146
|
+
inputBucketName: getTraxInsertData?.sqs?.Body?.inputBucketName,
|
|
1147
|
+
tempId: [ getTraxInsertData?.sqs?.Body?.tempId ],
|
|
1148
|
+
question: getTraxInsertData?.sqs?.Body?.question,
|
|
1149
|
+
fileDetails: getTraxInsertData?.sqs?.Body?.fileDetails,
|
|
1150
|
+
createdAt: new Date(),
|
|
1151
|
+
};
|
|
1152
|
+
await insertOpenSearchData( openSearch.traxDetectionOutput, OpenSearchOutput );
|
|
1130
1153
|
const logData2 = {
|
|
1131
1154
|
userId: req.user._id,
|
|
1132
1155
|
userName: req.user.userName,
|
|
@@ -1151,6 +1174,7 @@ export async function saveBinary( req, res ) {
|
|
|
1151
1174
|
createdAt: Date.now(),
|
|
1152
1175
|
};
|
|
1153
1176
|
await insertOpenSearchData( openSearch.auditLog, logData2 );
|
|
1177
|
+
|
|
1154
1178
|
return res.sendSuccess( `Successfully updated in ${value}` );
|
|
1155
1179
|
|
|
1156
1180
|
break;
|