Skip to content

Commit e01f622

Browse files
Adding diff API endpoints
1 parent 2b8e84f commit e01f622

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

lib/connectionConfig.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,15 @@ ConnectionConfig.prototype.pullURL = function () {
503503
return purl;
504504
};
505505

506+
/**
507+
* Generate URL for diff endpoint
508+
* @returns {string}
509+
*/
510+
ConnectionConfig.prototype.diffURL = function () {
511+
const purl = this.branchBase('diff');
512+
return purl;
513+
};
514+
506515
/**
507516
* Generate URL for fetch endpoint
508517
* @param {string} remoteName

lib/woqlClient.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,7 +1501,7 @@ WOQLClient.prototype.getVersionObjectDiff = function (id, beforeVersion, after)
15011501
const payload = { document_id : id, before_data_version : beforeVersion, after: after};
15021502
return this.dispatch(
15031503
CONST.POST,
1504-
this.branchBase('diff'),
1504+
this.connectionConfig.diffURL(),
15051505
payload,
15061506
).then((response) => response);
15071507
};
@@ -1531,7 +1531,7 @@ WOQLClient.prototype.getVersionDiff = function (id, beforeVersion, afterVersion)
15311531
const payload = { document_id : id, before_data_version : beforeVersion, after_data_version: afterVersion};
15321532
return this.dispatch(
15331533
CONST.POST,
1534-
this.branchBase('diff'),
1534+
this.connectionConfig.diffURL(),
15351535
payload,
15361536
).then((response) => response);
15371537
};

0 commit comments

Comments
 (0)