tango-app-api-audit 3.4.37 → 3.4.38

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.37",
3
+ "version": "3.4.38",
4
4
  "description": "audit & audit metrics apis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -3456,46 +3456,6 @@ export async function getDetectionAuditFile( req, res ) {
3456
3456
  const auditStatus = userDetails && userDetails.length > 0 ? userDetails[0].auditStatus : null;
3457
3457
  switch ( auditStatus ) {
3458
3458
  case null:
3459
- // const query = [
3460
- // {
3461
- // $match: {
3462
- // $and: [
3463
- // { userId: { $eq: req.user._id } },
3464
- // { isCompleted: { $eq: false } },
3465
- // { queueName: inputData.queueName },
3466
- // { moduleType: inputData.moduleType },
3467
- // ],
3468
- // },
3469
- // },
3470
- // ];
3471
- // const userAssign = await aggregateAssignAudit( query );
3472
- // if ( userAssign.length > 0 ) {
3473
- // logger.info( 'Hit in user assign', { inputData } );
3474
- // userAssign[0].auditType == 'Audit' ?
3475
- // ( msg = {
3476
- // storeId: userAssign[0].storeId,
3477
- // fileDate: userAssign[0].fileDate,
3478
- // fileCount: userAssign[0].fileCount,
3479
- // inputBucketName: userAssign[0].inputBucketName,
3480
- // folderPath: userAssign[0].folderPath,
3481
- // } ) :
3482
- // ( msg = {
3483
- // storeId: userAssign[0].storeId,
3484
- // fileDate: userAssign[0].fileDate,
3485
- // auditType: userAssign[0].auditType,
3486
- // fileCount: userAssign[0].fileCount,
3487
- // inputBucketName: userAssign[0].inputBucketName,
3488
- // folderPath: userAssign[0].folderPath,
3489
- // } );
3490
- // await updateOneAssignAudit(
3491
- // { _id: userAssign[0]._id },
3492
- // { isCompleted: true },
3493
- // );
3494
- // logger.info( 'Hit in auditUserAssignModel updateOne', {
3495
- // _id: userAssign[0]._id,
3496
- // isCompleted: true,
3497
- // } );
3498
- // } else {
3499
3459
  logger.info( 'Hit in new file', { inputData } );
3500
3460
  const consumer = await sqsReceive( inputData.queueName );
3501
3461
  if ( !consumer ) {
@@ -3507,7 +3467,6 @@ export async function getDetectionAuditFile( req, res ) {
3507
3467
  return res.sendError( `${inputData.queueName} is Empty`, 204 );
3508
3468
  }
3509
3469
  msg = JSON.parse( consumer );
3510
- // }
3511
3470
  break;
3512
3471
 
3513
3472
  case 'drafted':
@@ -3643,7 +3602,7 @@ export async function getDetectionAuditFile( req, res ) {
3643
3602
  };
3644
3603
  files.push( {
3645
3604
  img_path: data,
3646
- img_name: inputData.moduleType=='mobile-detection'?`${indexes[0]}-${indexes[3]}`: inputData.moduleType=='hygiene'?`${indexes[2]}-${indexes[3]}`:image[0],
3605
+ img_name: inputData.moduleType=='mobile-detection'?`${indexes[0]}-${indexes[3]}`:image[0],
3647
3606
  img_id: inputData.moduleType=='hygiene'? img[4] : img[3],
3648
3607
  selected: false,
3649
3608
  dropped: false,