Skip to content

Commit 154e8da

Browse files
Add log parameters
1 parent 1e3d865 commit 154e8da

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/woqlClient.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,15 +1476,17 @@ WOQLClient.prototype.getBranches = function (dbId) {
14761476

14771477
/**
14781478
* get the database collections list
1479-
* @param {string} [dbId] - the database id
1479+
* @param {number} [start=0] - where to start printing the commit
1480+
* information in the log (starting from the head of the current branch)
1481+
* @param {number} [count=1] - The number of total commit log records to return
14801482
* @returns {Promise} A promise that returns the call response object, or an Error if rejected.
14811483
* @example
1482-
* client.getCommitsLog()
1483-
*/
1484-
WOQLClient.prototype.getCommitsLog = function () {
1484+
* client.getCommitsLog(count=10)
1485+
*/
1486+
WOQLClient.prototype.getCommitsLog = function (start=0, count=1) {
14851487
return this.dispatch(
14861488
CONST.GET,
1487-
this.connectionConfig.log(),
1489+
this.connectionConfig.log() + `?start=${start}&count=${count}`,
14881490
);
14891491
};
14901492

0 commit comments

Comments
 (0)