tango-app-api-infra 3.1.34-beta.26 → 3.1.34-beta.28

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-infra",
3
- "version": "3.1.34-beta.26",
3
+ "version": "3.1.34-beta.28",
4
4
  "description": "infra",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -948,7 +948,6 @@ export async function InstallationIssuesTable( req, res ) {
948
948
  'Status': element.status,
949
949
  } );
950
950
  } );
951
- console.log( exportdata );
952
951
  await download( exportdata, res );
953
952
  return;
954
953
  }
@@ -575,6 +575,7 @@ export async function OutsideUserList( req, res ) {
575
575
  $expr: {
576
576
  $and: [
577
577
  { $eq: [ '$groupName', '$$group' ] },
578
+ { $eq: [ '$clientId', inputData.clientId ] },
578
579
  ],
579
580
  },
580
581
  },
@@ -589,7 +590,7 @@ export async function OutsideUserList( req, res ) {
589
590
  },
590
591
  {
591
592
  $unwind: {
592
- path: '$groups', preserveNullAndEmptyArrays: true,
593
+ path: '$groups',
593
594
  },
594
595
  },
595
596
  {
@@ -636,7 +637,6 @@ export async function OutsideUserList( req, res ) {
636
637
  );
637
638
  }
638
639
  const result = await aggregatemailonlyuser( query );
639
- console.log( result );
640
640
 
641
641
  for ( let data of result ) {
642
642
  data.Finalstores = [ ...new Set( data.Finalstores ) ];
@@ -690,11 +690,6 @@ export async function saveInfraEmailConfig( req, res ) {
690
690
  if ( inputData.type === 'users' ) {
691
691
  if ( inputData.userList && inputData.userList.length > 0 ) {
692
692
  for ( let user of inputData.userList ) {
693
- console.log( user.infraAlert, {
694
- emailAlert: {
695
- infra: user.infraAlert,
696
- },
697
- } );
698
693
  await updateOneUser( { email: user.email }, {
699
694
  emailAlert: {
700
695
  infra: user.infraAlert,
@@ -477,20 +477,14 @@ export async function emailUserList( req, res ) {
477
477
  let storelist = await findStore( { 'storeId': { $in: user.stores }, 'status': 'active', 'edge.firstFile': true }, { 'storeId': 1, 'storeProfile.timeZone': 1 } );
478
478
  obj.storeList = storelist;
479
479
  }
480
- if ( user.stores&&user.stores.length>0 ) {
481
- let storelist = await findStore( { 'storeId': { $in: user.stores }, 'status': 'active', 'edge.firstFile': true }, { 'storeId': 1, 'storeProfile.timeZone': 1 } );
482
- obj.storeList = storelist;
483
- }
484
-
485
480
  for ( let group of user.groups ) {
486
481
  let groupdata = await findOneGroup( { 'groupName': group, 'clientId': req.query.clientId } );
487
482
  let storelist = await findStore( { 'storeId': { $in: groupdata.storeList }, 'status': 'active', 'edge.firstFile': true }, { 'storeId': 1, 'storeProfile.timeZone': 1 } );
488
483
  obj.storeList = [ ...obj.storeList, ...storelist ];
489
484
  }
490
-
491
485
  MailOnlyUsers.push( obj );
492
- clientList = [ ...clientList, ...MailOnlyUsers ];
493
486
  }
487
+ clientList = [ ...clientList, ...MailOnlyUsers ];
494
488
  }
495
489
  }
496
490