tango-app-api-client 3.4.0-beta.1 → 3.4.0-beta.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-client",
3
- "version": "3.4.0-beta.1",
3
+ "version": "3.4.0-beta.2",
4
4
  "description": "client",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -2655,7 +2655,9 @@ export async function getActivityLogs( req, res ) {
2655
2655
  if ( ( ( hit?._source?.eventType ).match( /update/ ) || ( hit?._source?.eventType ).match( /edit/ ) )&& hit?._source?.previous ) {
2656
2656
  const previous = hit?._source?.oldData;
2657
2657
  const current=hit?._source?.newData;
2658
- respo = findDifferences( previous, current );
2658
+ if ( previous && current ) {
2659
+ respo = findDifferences( previous, current );
2660
+ }
2659
2661
  hit._source.updatedValue = respo;
2660
2662
  temp.push( hit?._source );
2661
2663
  // hit._source.changes =logSubType === 'ticketConfig'? Object.keys( respo ).map( ( item ) => item ) : hit._source.changes;
@@ -2675,6 +2677,7 @@ export async function getActivityLogs( req, res ) {
2675
2677
  }
2676
2678
 
2677
2679
  function findDifferences( oldData, newData ) {
2680
+ logger.info( { oldData: oldData, newData: newData } );
2678
2681
  const allKeys = new Set( [ ...Object.keys( oldData ), ...Object.keys( newData ) ] );
2679
2682
  const diff = {};
2680
2683