tango-app-api-audit 1.0.6 → 1.0.7

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": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "audit & audit metrics apis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -23,7 +23,7 @@
23
23
  "nodemon": "^3.1.3",
24
24
  "swagger-ui-express": "^5.0.1",
25
25
  "tango-api-schema": "^2.0.117",
26
- "tango-app-api-middleware": "^3.1.20",
26
+ "tango-app-api-middleware": "^3.1.23",
27
27
  "winston": "^3.13.0",
28
28
  "winston-daily-rotate-file": "^5.0.0"
29
29
  },
@@ -248,8 +248,10 @@ export async function getAuditFile( req, res ) {
248
248
  if ( inputData.nextId ) {
249
249
  fetchData.ContinuationToken = decodeURIComponent( inputData.nextId );
250
250
  }
251
- const [ folderPath, nextQuery ] = await listFileByPath( fetchData );
252
- logger.info( { nextQuery: nextQuery } );
251
+ const list = await listFileByPath( fetchData );
252
+ const folderPath = list.data;
253
+ const nextQuery = list.pageToken;
254
+ logger.info( { nextQuery: folderPath } );
253
255
  if ( folderPath?.length > 0 ) {
254
256
  for ( let i = 0; i < folderPath.length; i++ ) {
255
257
  const img = folderPath[i].Key.split( '/' );
@@ -11,6 +11,13 @@ export async function clients( req, res ) {
11
11
  'auditConfigs.audit': true,
12
12
  },
13
13
  },
14
+ {
15
+ $project: {
16
+ _id: 0,
17
+ clientName: 1,
18
+ clientId: 1,
19
+ },
20
+ },
14
21
  ];
15
22
 
16
23
  const count = await aggregateClient( query );