tango-app-api-analysis-traffic 3.8.7-vms.25 → 3.8.7-vms.27

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-analysis-traffic",
3
- "version": "3.8.7-vms.25",
3
+ "version": "3.8.7-vms.27",
4
4
  "description": "Traffic Analysis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -746,12 +746,20 @@ export async function tagTempId( req, res ) {
746
746
  return { success: false, errors: res1.items };
747
747
  } else {
748
748
  logger.info( { msg: 'res1' } );
749
- return res.sendSuccess( `ID tagged as duplicates` );
749
+ return res.sendSuccess( `ID tagged as Duplicates` );
750
750
  // return { success: true };
751
751
  }
752
752
  }
753
753
  } else {
754
- const message = inputData?.revopsType == 'non-tagging' ? 'ID removed from tagging' :inputData?.revopsType == 'employee' ?'ID tagged as an employee/staff':inputData?.revopsType == 'junk'? 'ID tagged as a junk':'ID tagged as an house keeping';
754
+ // Convert camelCase revopsType to space-separated and capitalize first letter of each word
755
+ function camelCaseToTitle( str ) {
756
+ if ( !str ) return '';
757
+ return str.replace( /([A-Z])/g, ' $1' ).replace( /^./, ( s ) => s.toUpperCase() );
758
+ }
759
+ const titleRevopsType = camelCaseToTitle( inputData?.revopsType );
760
+ const message = inputData?.revopsType == 'non-tagging' ?
761
+ 'ID removed from tagging' :
762
+ `ID tagged as ${titleRevopsType}`;
755
763
  return res.sendSuccess( message );
756
764
  }
757
765
  } catch ( error ) {
@@ -17,7 +17,6 @@ revopRouter
17
17
  .get( '/store-processed-data', isAllowedSessionHandler, validate( storeProcessedDataValid ), storeProcessedData )
18
18
  .get( '/footfall-images', isAllowedSessionHandler, validate( footfallImagesValid ), getTaggingConfig, footFallImages )
19
19
  .post( '/tag-tempId', isAllowedSessionHandler, validate( tagTempIdValid ), deleteTaggedDuplicate, mappingConfig, tagTempId )
20
-
21
20
  .post( '/get-categorized-images', isAllowedSessionHandler, validate( getCategorizedImagesValid ), getCategorizedImages );
22
21
 
23
22
 
@@ -80,7 +80,7 @@ export async function getTaggingConfig( req, res, next ) {
80
80
 
81
81
 
82
82
  const getData = await aggregate( configQuery );
83
- logger.info( { getData } );
83
+
84
84
  // Convert "taggingLimitation" array (if present) to "config" object with expected key-value pairs
85
85
  let config = {};
86
86
  if ( getData && getData?.length > 0 && Array.isArray( getData?.[0]?.effectiveLimitation?.values ) ) {