tango-app-api-audit 3.6.58 → 3.6.59

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.6.58",
3
+ "version": "3.6.59",
4
4
  "description": "audit & audit metrics apis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -28,7 +28,7 @@
28
28
  "nodemailer": "^7.0.10",
29
29
  "nodemon": "^3.1.3",
30
30
  "swagger-ui-express": "^5.0.1",
31
- "tango-api-schema": "^2.6.41",
31
+ "tango-api-schema": "^2.6.42",
32
32
  "tango-app-api-middleware": "^3.6.18",
33
33
  "winston": "^3.13.0",
34
34
  "winston-daily-rotate-file": "^5.0.0"
@@ -1602,6 +1602,17 @@ export async function save( req, res ) {
1602
1602
  moduleType: inputData.moduleType,
1603
1603
  zoneName: inputData.zoneName,
1604
1604
  } );
1605
+ if ( storeAuditData?.status === 'completed' ) {
1606
+ logger.info( {
1607
+ message: 'This file is already submitted',
1608
+ storeId: inputData.storeId,
1609
+ fileDate: inputData.fileDate,
1610
+ moduleType: inputData.moduleType,
1611
+ zoneName: inputData.zoneName,
1612
+ function: 'save',
1613
+ } );
1614
+ return res.sendError( 'This file is already submitted', 409 );
1615
+ }
1605
1616
  if ( inputData.moduleType !=='track' ) {
1606
1617
  const params = {
1607
1618
  Key: `${inputData.storeId}/${inputData.zoneName}/${inputData.fileDate}/${bucket.masterJsonFile}`,