tango-app-api-audit 3.4.33 → 3.4.35

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.33",
3
+ "version": "3.4.35",
4
4
  "description": "audit & audit metrics apis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -283,7 +283,7 @@ export async function consolidatedCard( req, res ) {
283
283
  'totalFiles': '$totalFilesCount',
284
284
  'totalBC': '$totalBeforeCount',
285
285
  'totalAC': '$totalAfterCount',
286
- 'totalEarnings(Rs)': { $round: [ '$totalEarn', 2 ] },
286
+ 'totalEarnings': { $round: [ '$totalEarn', 2 ] },
287
287
  'totalReducedAmount': { $round: [ '$totalReducedAmount', 2 ] },
288
288
  'totalCredit': { $round: [ '$totalCredit', 2 ] },
289
289
  'message': req.message,
@@ -292,7 +292,16 @@ export async function consolidatedCard( req, res ) {
292
292
  ];
293
293
  const result = await aggregateAuditUserWallet( query );
294
294
  if ( result.length == 0 ) {
295
- return res.sendError( 'No Data Found', 204 );
295
+ return res.sendSuccess( { result: {
296
+ 'userEmail': inputData.userEmail,
297
+ 'totalFiles': 0,
298
+ 'totalBC': 0,
299
+ 'totalAC': 0,
300
+ 'totalEarnings': 0,
301
+ 'totalReducedAmount': 0,
302
+ 'totalCredit': 0,
303
+ 'message': req.message,
304
+ } } );
296
305
  }
297
306
  return res.sendSuccess( { result: result[0] } );
298
307
  } catch ( error ) {
@@ -40,7 +40,7 @@ auditRouter.get( '/total-not-assigned-count', isAllowedSessionHandler, accessVer
40
40
 
41
41
  // audit user wallet
42
42
  auditRouter.get( '/get-user-credit', isAllowedSessionHandler, isAuditUser, getUserCredit );
43
- auditRouter.get( '/get-user-audit-count', isAllowedSessionHandler, getUserAuditCount );
43
+ auditRouter.get( '/get-user-audit-count', getUserAuditCount );
44
44
  auditRouter.get( '/get-user-audit-count-mtd', isAllowedSessionHandler, getUserAuditCountMTD );
45
45
 
46
46
  // audit log