tango-app-api-audit 3.4.11-alpha.5 → 3.4.11-alpha.6

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.4.11-alpha.5",
3
+ "version": "3.4.11-alpha.6",
4
4
  "description": "audit & audit metrics apis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -24,7 +24,7 @@
24
24
  "mongodb": "^6.7.0",
25
25
  "nodemon": "^3.1.3",
26
26
  "swagger-ui-express": "^5.0.1",
27
- "tango-api-schema": "^2.1.28",
27
+ "tango-api-schema": "^2.1.36",
28
28
  "tango-app-api-middleware": "^3.1.33",
29
29
  "winston": "^3.13.0",
30
30
  "winston-daily-rotate-file": "^5.0.0"
@@ -1043,40 +1043,39 @@ export async function getAuditFile( req, res ) {
1043
1043
  ];
1044
1044
  break;
1045
1045
  case 'uniform-detection':
1046
- for ( let i =0; i< msg.fileDetails.length; i++ ) {
1047
- const files = [];
1046
+ const files = [];
1048
1047
 
1049
- const params ={
1050
- Bucket: msg.inputBucketName,
1051
- Key: msg?.fileDetails[i]?.filePath,
1052
- };
1048
+ const params ={
1049
+ Bucket: msg.inputBucketName,
1050
+ Key: msg?.filePath,
1051
+ };
1053
1052
 
1054
- const isExists = await checkFileExist( params );
1053
+ const isExists = await checkFileExist( params );
1055
1054
 
1056
- if ( isExists ) {
1057
- const signedParams ={
1058
- Bucket: msg.inputBucketName,
1059
- file_path: msg?.fileDetails[i]?.filePath,
1060
- };
1061
- const data = await signedUrl( signedParams );
1055
+ if ( isExists ) {
1056
+ const signedParams ={
1057
+ Bucket: msg.inputBucketName,
1058
+ file_path: msg?.filePath,
1059
+ };
1060
+ const data = await signedUrl( signedParams );
1062
1061
 
1063
- files.push(
1064
- data,
1065
- );
1066
- }
1067
- // else {
1068
- // logger.error( {
1069
- // error: { folderPath: folderPath },
1070
- // function: `getAuditFile - ${inputData.moduleType}`,
1071
- // message: 'Bucket image data not availale',
1072
- // } );
1073
- // return res.sendError( 'Bucket is Empty', 204 );
1074
- // }
1075
- result.push( {
1076
- type: msg.fileDetails[i].type,
1077
- file: files,
1078
- } );
1062
+ files.push(
1063
+ data,
1064
+ );
1079
1065
  }
1066
+ // else {
1067
+ // logger.error( {
1068
+ // error: { folderPath: folderPath },
1069
+ // function: `getAuditFile - ${inputData.moduleType}`,
1070
+ // message: 'Bucket image data not availale',
1071
+ // } );
1072
+ // return res.sendError( 'Bucket is Empty', 204 );
1073
+ // }
1074
+ result.push( {
1075
+ type: 'image',
1076
+ file: files,
1077
+ } );
1078
+
1080
1079
  break;
1081
1080
  case 'unattended-customer':
1082
1081
  case 'left-in-middle':