Skip to content

Commit dfdc7ad

Browse files
committed
Promisification of the whoAmI method
1 parent 439de11 commit dfdc7ad

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/kuzzle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ module.exports = Kuzzle = function (url, options, cb) {
266266
filter: function (name, func, target, passes) {
267267
var whitelist = ['getAllStatistics', 'getServerInfo', 'getStatistics',
268268
'listCollections', 'listIndexes', 'login', 'logout', 'now', 'query',
269-
'checkToken'];
269+
'checkToken', 'whoAmI'];
270270

271271
return passes && whitelist.indexOf(name) !== -1;
272272
}

test/kuzzle/constructor.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ describe('Kuzzle constructor', () => {
186186
should.exist(kuzzle.nowPromise);
187187
should.exist(kuzzle.queryPromise);
188188
should.exist(kuzzle.checkTokenPromise);
189+
should.exist(kuzzle.whoAmIPromise);
189190
should.not.exist(kuzzle.removeAllListenersPromise);
190191
should.not.exist(kuzzle.removeListenerPromise);
191192
should.not.exist(kuzzle.replayQueuePromise);

0 commit comments

Comments
 (0)