tango-app-api-audit 3.4.0 → 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
|
@@ -198,9 +198,9 @@ 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 =
|
|
202
|
-
const data = await getDate( previousDate, new Date() );
|
|
203
|
-
logger.info( { data: data, function: 'data', newDate: new Date() } );
|
|
201
|
+
const previousDate = dayjs( new Date() ).subtract( 1, 'days' );
|
|
202
|
+
const data = await getDate( new Date( dayjs( previousDate ).format( 'YYYY-MM-DD' ) ), new Date() );
|
|
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 } );
|
|
205
205
|
const start = data.start;
|
|
206
206
|
const end = data.end;
|
|
@@ -927,6 +927,7 @@ export async function workSpace( req, res ) {
|
|
|
927
927
|
},
|
|
928
928
|
},
|
|
929
929
|
];
|
|
930
|
+
logger.info( { daterange: new Date( dayjs( fileDate ).format( 'YYYY-MM-DD' ) ) } );
|
|
930
931
|
const userIncompleteFiles = [
|
|
931
932
|
{
|
|
932
933
|
$match: {
|
|
@@ -934,7 +935,7 @@ export async function workSpace( req, res ) {
|
|
|
934
935
|
{ clientId: { $in: clientList } },
|
|
935
936
|
{ userId: { $eq: req.user._id } },
|
|
936
937
|
{ moduleType: { $eq: inputData.moduleType } },
|
|
937
|
-
{ createdAt: { $gte:
|
|
938
|
+
{ createdAt: { $gte: new Date( dayjs( fileDate ).format( 'YYYY-MM-DD' ) ) } },
|
|
938
939
|
{ createdAt: { $lte: dateRange.end } },
|
|
939
940
|
],
|
|
940
941
|
},
|