Skip to content

Commit 5a3c34e

Browse files
Style fixes
1 parent e01f622 commit 5a3c34e

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

lib/woqlClient.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,7 +1475,6 @@ WOQLClient.prototype.getDiff = function (before, after) {
14751475
).then((response) => response);
14761476
};
14771477

1478-
14791478
/**
14801479
* Get the patch of difference between two documents.
14811480
* @param {string} id - The object id to be diffed
@@ -1490,15 +1489,15 @@ WOQLClient.prototype.getDiff = function (before, after) {
14901489
* );
14911490
*/
14921491
WOQLClient.prototype.getVersionObjectDiff = function (id, beforeVersion, after) {
1493-
if (typeof id !== 'string' || typeof beforeVersion !== 'string' || typeof after !== 'object') {
1492+
if (typeof id !== 'string' || typeof beforeVersion !== 'string' || typeof after !== 'object') {
14941493
const errmsg = '"id", "beforeVersion" or "after" parameter error - you must specify a valid after json document and valid id and version';
14951494

14961495
return Promise.reject(
14971496
new Error(ErrorMessage.getInvalidParameterMessage(CONST.GET_DIFF, errmsg)),
14981497
);
14991498
}
15001499

1501-
const payload = { document_id : id, before_data_version : beforeVersion, after: after};
1500+
const payload = { document_id: id, before_data_version: beforeVersion, after };
15021501
return this.dispatch(
15031502
CONST.POST,
15041503
this.connectionConfig.diffURL(),
@@ -1520,15 +1519,19 @@ WOQLClient.prototype.getVersionObjectDiff = function (id, beforeVersion, after)
15201519
* );
15211520
*/
15221521
WOQLClient.prototype.getVersionDiff = function (id, beforeVersion, afterVersion) {
1523-
if (typeof id !== 'string' || typeof beforeVersion !== 'string' || typeof afterVersion !== 'string') {
1522+
if (typeof id !== 'string' || typeof beforeVersion !== 'string' || typeof afterVersion !== 'string') {
15241523
const errmsg = '"id", "beforeVersion" or "after" parameter error - you must specify a valid after json document and valid id and version';
15251524

15261525
return Promise.reject(
15271526
new Error(ErrorMessage.getInvalidParameterMessage(CONST.GET_DIFF, errmsg)),
15281527
);
15291528
}
15301529

1531-
const payload = { document_id : id, before_data_version : beforeVersion, after_data_version: afterVersion};
1530+
const payload = {
1531+
document_id: id,
1532+
before_data_version: beforeVersion,
1533+
after_data_version: afterVersion,
1534+
};
15321535
return this.dispatch(
15331536
CONST.POST,
15341537
this.connectionConfig.diffURL(),

0 commit comments

Comments
 (0)