Skip to content

Commit 06f6a2a

Browse files
author
David Bengsch
authored
Merge branch 'develop' into develop-implement-scroll
2 parents 71efbd9 + 9a713a9 commit 06f6a2a

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

dist/kuzzle.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/kuzzle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/kuzzle.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,8 +1317,7 @@ Kuzzle.prototype.query = function (queryArgs, query, options, cb) {
13171317
* a developer simply wish to verify his token
13181318
*/
13191319
if (self.jwtToken !== undefined && !(object.controller === 'auth' && object.action === 'checkToken')) {
1320-
object.headers = object.headers || {};
1321-
object.headers.authorization = 'Bearer ' + self.jwtToken;
1320+
object.jwt = self.jwtToken;
13221321
}
13231322

13241323
if (queryArgs.collection) {

test/kuzzle/constructor.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ describe('Kuzzle constructor', () => {
10311031
should(kuzzle.offlineQueue[0].query.action).be.exactly('action');
10321032
should(kuzzle.offlineQueue[0].query.controller).be.exactly('controller');
10331033
should(kuzzle.offlineQueue[0].query.index).be.exactly('index');
1034-
should(kuzzle.offlineQueue[0].query.headers.authorization).be.exactly('Bearer fake-token');
1034+
should(kuzzle.offlineQueue[0].query.jwt).be.exactly('fake-token');
10351035
});
10361036
});
10371037
});

0 commit comments

Comments
 (0)