tango-app-api-audit 3.5.43 → 3.5.46

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.5.43",
3
+ "version": "3.5.46",
4
4
  "description": "audit & audit metrics apis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1220,12 +1220,12 @@ export async function summaryList( req, res ) {
1220
1220
  } );
1221
1221
  }
1222
1222
  const clusterQuery =[
1223
+ { $unwind: { path: '$Teamlead', preserveNullAndEmptyArrays: true } },
1223
1224
  { $match: {
1224
1225
  $and: clusterFilter,
1225
1226
 
1226
1227
  },
1227
1228
  },
1228
- { $unwind: { path: '$Teamlead', preserveNullAndEmptyArrays: true } },
1229
1229
  { $unwind: { path: '$stores', preserveNullAndEmptyArrays: true } },
1230
1230
  {
1231
1231
  $group: {
@@ -1278,6 +1278,7 @@ export async function summaryList( req, res ) {
1278
1278
 
1279
1279
  ];
1280
1280
  const RMQuery =[
1281
+ { $unwind: { path: '$Teamlead', preserveNullAndEmptyArrays: true } },
1281
1282
  { $match: {
1282
1283
  $and: [
1283
1284
  {
@@ -1289,7 +1290,6 @@ export async function summaryList( req, res ) {
1289
1290
  ],
1290
1291
  },
1291
1292
  },
1292
- { $unwind: { path: '$Teamlead', preserveNullAndEmptyArrays: true } },
1293
1293
  { $unwind: { path: '$stores', preserveNullAndEmptyArrays: true } },
1294
1294
  {
1295
1295
  $group: {
@@ -152,7 +152,7 @@ export const summaryListSchema = joi.object( {
152
152
  joi.string().required(),
153
153
  ).optional(),
154
154
  cluster: joi.array().items(
155
- joi.string().required(),
155
+ joi.string().optional(),
156
156
  ).optional(),
157
157
  storeId: joi.array().items( joi.string().required() ).required(),
158
158
  complianceScore: joi.number().optional().allow( null ),
@@ -21,7 +21,7 @@ eyeTestAuditRouter.post( '/summary-list', isAllowedSessionHandler, accessVerific
21
21
  eyeTestAuditRouter.post( '/summary-card', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ] } ), validate( summaryCardValid ), summaryCard );
22
22
  eyeTestAuditRouter.post( '/email-alert-log', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ] } ), isSuperAdmin, validate( emailAlertLogValid ), emailAlertLog );
23
23
 
24
- eyeTestAuditRouter.post( '/cluster-list', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ] } ), isSuperAdmin, validate( clusterListValid ), clusterList );
24
+ eyeTestAuditRouter.post( '/cluster-list', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ] } ), validate( clusterListValid ), clusterList );
25
25
  eyeTestAuditRouter.get( '/rm-list', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ] } ), isSuperAdmin, validate( rmListValid ), rmList );
26
26
 
27
27