tango-app-api-audit 3.4.11 → 3.4.12

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",
3
+ "version": "3.4.12",
4
4
  "description": "audit & audit metrics apis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -3853,7 +3853,6 @@ export async function auditImages( req, res ) {
3853
3853
  case 'AC':
3854
3854
 
3855
3855
  const [ filterData, auditImageAC ] = await Promise.all( [ getAuditFilterData( inputData ), getAuditImageData( inputData ) ] );
3856
-
3857
3856
  if ( filterData?.errorCode || auditImageAC?.errorCode ) {
3858
3857
  const error = ( filterData?.error || auditImageAC.error ) || 'Internal Server Error- get AC from Bucket';
3859
3858
  const code = filterData?.errorCode || auditImageAC.errorCode;
@@ -150,14 +150,16 @@ const filteredCustomerMap = async ( data ) => {
150
150
  const mapFunction = async ( chunkData, filterData ) => {
151
151
  for ( const data of filterData ) {
152
152
  const mappedIds = data.mappedid;
153
- for ( const mappedId of mappedIds ) {
154
- chunkData.find( ( item ) => {
155
- if ( mappedId.img_name === item.temp_ids ) {
156
- item.temp_ids = data.img_name;
157
- item.query_status = '';
158
- item.demographic = data.demographic || '';
159
- }
160
- } );
153
+ if ( data?.mappedid ) {
154
+ for ( const mappedId of mappedIds ) {
155
+ chunkData.find( ( item ) => {
156
+ if ( mappedId.img_name === item.temp_ids ) {
157
+ item.temp_ids = data.img_name;
158
+ mappedId.img_name === data.img_name? null: item.query_status = '';
159
+ item.demographic = data.demographic || '';
160
+ }
161
+ } );
162
+ }
161
163
  }
162
164
  }
163
165
  return chunkData;