tango-app-api-audit 3.4.1 → 3.4.2

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.1",
3
+ "version": "3.4.2",
4
4
  "description": "audit & audit metrics apis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -198,7 +198,7 @@ export async function getAuditFile( req, res ) {
198
198
  const bucket = JSON.parse( process.env.BUCKET );
199
199
  const openSearch = JSON.parse( process.env.OPENSEARCH );
200
200
  const inputData = req.query;
201
- const previousDate = dayjs( dateRange.start ).subtract( 1, 'days' );
201
+ const previousDate = dayjs( new Date() ).subtract( 1, 'days' );
202
202
  const data = await getDate( new Date( dayjs( previousDate ).format( 'YYYY-MM-DD' ) ), new Date() );
203
203
  logger.info( { data: data, previousDate: previousDate, function: 'data', newDate: new Date() } );
204
204
  logger.info( { userId: req.user._id, queueName: inputData.queueName, moduleType: inputData.moduleType } );