Skip to content

Commit 2bfb1c9

Browse files
committed
deltaToJsonPatch
1 parent 7642cdc commit 2bfb1c9

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

services/static-webserver/client/source/class/osparc/wrapper/JsonDiffPatch.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,10 @@ qx.Class.define("osparc.wrapper.JsonDiffPatch", {
8181
return delta;
8282
},
8383

84-
patch: function(obj, delta) {
85-
this.__diffPatcher.patch(obj, delta);
86-
return obj;
84+
// format to JSON PATCH (RFC 6902)
85+
deltaToJsonPatch: function(delta) {
86+
const patch = this.__diffPatcher.formatters.jsonpatch.format(delta);
87+
return patch;
8788
},
88-
89-
// deep clone
90-
clone: function(obj) {
91-
return this.__diffPatcher.clone(obj);
92-
}
9389
}
9490
});

0 commit comments

Comments
 (0)