tango-app-api-audit 3.6.59 → 3.6.60

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.59",
3
+ "version": "3.6.60",
4
4
  "description": "audit & audit metrics apis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -948,6 +948,7 @@ export async function getFilterData( msg, user ) {
948
948
  }
949
949
  } catch ( error ) {
950
950
  /* openSearch logs start*/
951
+ const bucket = JSON.parse( process.env.BUCKET );
951
952
  const id = `${msg.store_id}_${msg.zone_id}_${msg.curr_date}_${bucket.masterJsonFile}_getFilterData_Error_${user?.email}_${Date.now()}`;
952
953
  let temp = msg;
953
954
  temp.logType='audit';
@@ -1034,7 +1035,11 @@ export async function getAuditImage( msg, user ) {
1034
1035
  }
1035
1036
  } catch ( error ) {
1036
1037
  /* openSearch logs start*/
1037
- const id = `${fileDate}_${storeId}_${msg.zone_id}_${bucket.auditInput}_getAuditImage_Error_${user?.email}_${Date.now()}`;
1038
+ const bucket = JSON.parse( process.env.BUCKET );
1039
+ const fetchData = {};
1040
+ fetchData.Bucket = `${bucket.auditInput}`;
1041
+ fetchData.filePath = `${msg?.curr_date}/${msg?.store_id}/${msg.zone_id}/`;
1042
+ const id = `${msg?.curr_date}_${msg?.store_id}_${msg.zone_id}_${bucket.auditInput}_getAuditImage_Error_${user?.email}_${Date.now()}`;
1038
1043
  let temp = msg;
1039
1044
  temp.logType='audit';
1040
1045
  temp.logSubType='get-audit-file';