tango-app-api-infra 3.1.34-beta.40 → 3.1.34-beta.41

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.40",
3
+ "version": "3.1.34-beta.41",
4
4
  "description": "infra",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -684,8 +684,11 @@ export async function emailUserListv2( req, res ) {
684
684
  }
685
685
  for ( let cluster of user.clusters ) {
686
686
  let clusterdata = await findOneCluster( { '_id': cluster, 'clientId': req.query.clientId } );
687
+ console.log( clusterdata );
687
688
  if ( clusterdata&&clusterdata.stores ) {
688
- let storelist = await findStore( { 'storeId': { $in: clusterdata.stores }, 'status': 'active', 'edge.firstFile': true }, { 'storeId': 1, 'storeProfile.timeZone': 1 } );
689
+ let stores = clusterdata.stores.map( ( data ) => data.storeId );
690
+ let storelist = await findStore( { 'storeId': { $in: stores }, 'status': 'active', 'edge.firstFile': true }, { 'storeId': 1, 'storeProfile.timeZone': 1 } );
691
+ console.log( storelist );
689
692
  obj.storeList = [ ...obj.storeList, ...storelist ];
690
693
  }
691
694
  }
@@ -696,7 +699,7 @@ export async function emailUserListv2( req, res ) {
696
699
  }
697
700
 
698
701
  let response = [];
699
-
702
+ console.log( clientList );
700
703
  for ( let user of clientList ) {
701
704
  if ( user.userType == 'client' ) {
702
705
  if ( user.role !== 'superadmin' ) {