tango-app-api-analysis-traffic 3.0.0-alpha.39 → 3.0.0-alpha.40
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
|
@@ -823,9 +823,7 @@ export async function headerClustersV2( req, res ) {
|
|
|
823
823
|
}
|
|
824
824
|
} else {
|
|
825
825
|
if ( getUserType == 'tango' ) {
|
|
826
|
-
console.log( requestData.clientId );
|
|
827
826
|
clusterNames = await getclusterList( requestData.clientId, getUserType, getRole, req );
|
|
828
|
-
console.log( clusterNames );
|
|
829
827
|
} else if ( getUserType == 'client' ) {
|
|
830
828
|
if ( getRole == 'superadmin' ) {
|
|
831
829
|
clusterNames = await getclusterList( requestData.clientId, getUserType, getRole, req );
|
|
@@ -834,7 +832,6 @@ export async function headerClustersV2( req, res ) {
|
|
|
834
832
|
}
|
|
835
833
|
}
|
|
836
834
|
}
|
|
837
|
-
console.log( clusterNames );
|
|
838
835
|
if ( clusterNames.length>0 ) {
|
|
839
836
|
const dataObjects = clusterNames.map( ( item ) => ( { groupName: item } ) );
|
|
840
837
|
res.sendSuccess( { groupData: dataObjects } );
|
|
@@ -853,7 +850,7 @@ async function getCityClusters( userClientId, getUserEmail, getRole, requestCity
|
|
|
853
850
|
if ( userClientId && userClientId !='' && getUserEmail && getUserEmail !='', getRole && getRole !='', requestCity && requestCity.length>0 ) {
|
|
854
851
|
let cityStores = await getLocationStores( userClientId, requestCity, req );
|
|
855
852
|
if ( cityStores && cityStores.length > 0 ) {
|
|
856
|
-
let storeGroups = await getClusterStoresIds( userClientId, cityStores, getRole, getUserType, getUserEmail );
|
|
853
|
+
let storeGroups = await getClusterStoresIds( userClientId, cityStores, getRole, getUserType, getUserEmail, req );
|
|
857
854
|
if ( storeGroups && storeGroups.length > 0 ) {
|
|
858
855
|
return storeGroups;
|
|
859
856
|
} else {
|
|
@@ -870,7 +867,7 @@ async function getCityClusters( userClientId, getUserEmail, getRole, requestCity
|
|
|
870
867
|
return false;
|
|
871
868
|
}
|
|
872
869
|
}
|
|
873
|
-
async function getClusterStoresIds( userClientId, storeIds, getRole, getUserType, getUserEmail ) {
|
|
870
|
+
async function getClusterStoresIds( userClientId, storeIds, getRole, getUserType, getUserEmail, req ) {
|
|
874
871
|
try {
|
|
875
872
|
if ( userClientId && userClientId !='' && storeIds && storeIds !='' && getRole && getRole !='' && getUserType && getUserType !='', getUserEmail && getUserEmail !='' ) {
|
|
876
873
|
let clusterQuery = [];
|
|
@@ -917,7 +914,6 @@ async function getClusterStoresIds( userClientId, storeIds, getRole, getUserType
|
|
|
917
914
|
}
|
|
918
915
|
}
|
|
919
916
|
} else if ( getUserType == 'tango' ) {
|
|
920
|
-
console.log( storeIds );
|
|
921
917
|
clusterQuery = [
|
|
922
918
|
{
|
|
923
919
|
$match: {
|