tango-app-api-client 3.4.0-beta.0 → 3.4.0-beta.1
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
|
@@ -2674,16 +2674,24 @@ export async function getActivityLogs( req, res ) {
|
|
|
2674
2674
|
}
|
|
2675
2675
|
}
|
|
2676
2676
|
|
|
2677
|
-
function findDifferences(
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2677
|
+
function findDifferences( oldData, newData ) {
|
|
2678
|
+
const allKeys = new Set( [ ...Object.keys( oldData ), ...Object.keys( newData ) ] );
|
|
2679
|
+
const diff = {};
|
|
2680
|
+
|
|
2681
|
+
allKeys.forEach( ( key ) => {
|
|
2682
|
+
const previous = key in oldData ? oldData[key] : null;
|
|
2683
|
+
const current = key in newData ? newData[key] : null;
|
|
2684
|
+
|
|
2685
|
+
// Only include fields that are added or updated (where previous !== current)
|
|
2686
|
+
if ( previous !== current ) {
|
|
2687
|
+
diff[splitCamelCase( key )] = {
|
|
2688
|
+
previous,
|
|
2689
|
+
current,
|
|
2690
|
+
};
|
|
2683
2691
|
}
|
|
2684
|
-
}
|
|
2692
|
+
} );
|
|
2685
2693
|
|
|
2686
|
-
return
|
|
2694
|
+
return diff;
|
|
2687
2695
|
}
|
|
2688
2696
|
|
|
2689
2697
|
function splitCamelCase( text ) {
|