Skip to content

Commit 566e385

Browse files
Merge pull request #257 from terminusdb/add_logging_parameters
Add log parameters
2 parents eec27c1 + 154e8da commit 566e385

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
@@ -1475,15 +1475,17 @@ WOQLClient.prototype.getBranches = function (dbId) {
14751475

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

0 commit comments

Comments
 (0)