tango-app-api-audit 3.4.15 → 3.4.16

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.15",
3
+ "version": "3.4.16",
4
4
  "description": "audit & audit metrics apis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1725,14 +1725,16 @@ export async function userAuditHistory( req, res ) {
1725
1725
  logger.info( { mappedArrays: mappedArrays[0] } );
1726
1726
  await download( mappedArrays[0], res );
1727
1727
  return;
1728
+ } else {
1729
+ query.push( {
1730
+ $skip: offset,
1731
+ },
1732
+ {
1733
+ $limit: limit,
1734
+ } );
1728
1735
  }
1729
1736
 
1730
- query.push( {
1731
- $skip: offset,
1732
- },
1733
- {
1734
- $limit: limit,
1735
- } );
1737
+
1736
1738
  const result = await aggregateUserAudit( query );
1737
1739
 
1738
1740
  return res.sendSuccess( { result: result, count: count.length } );
@@ -1909,14 +1909,16 @@ export async function userAuditHistory( req, res ) {
1909
1909
  logger.info( { mappedArrays: mappedArrays[0] } );
1910
1910
  await download( mappedArrays[0], res );
1911
1911
  return;
1912
+ } else {
1913
+ query.push( {
1914
+ $skip: offset,
1915
+ },
1916
+ {
1917
+ $limit: limit,
1918
+ } );
1912
1919
  }
1913
1920
 
1914
- query.push( {
1915
- $skip: offset,
1916
- },
1917
- {
1918
- $limit: limit,
1919
- } );
1921
+
1920
1922
  const result = [ 'mobile-detection', 'uniform-detection' ].includes( inputData.moduleType )? await aggregateUserEmpDetection( query ) : await aggregateBinaryAudit( query );
1921
1923
 
1922
1924
  return res.sendSuccess( { result: result, count: count.length } );