Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@craftgate/craftgate",
"version": "1.0.66",
"version": "1.0.67",
"description": "Craftgate API JavaScript Client",
"main": "dist/index.js",
"scripts": {
Expand Down Expand Up @@ -38,6 +38,6 @@
"typescript": "4.4.4"
},
"dependencies": {
"axios": "0.31.0"
"axios": "0.31.1"
}
}
}
2 changes: 1 addition & 1 deletion src/lib/HttpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class HttpClient {
config.headers[API_KEY_HEADER_NAME] = this._options.apiKey;
config.headers[RANDOM_HEADER_NAME] = randomStr;
config.headers[AUTH_VERSION_HEADER_NAME] = '1';
config.headers[CLIENT_VERSION_HEADER_NAME] = 'craftgate-node-client:1.0.66';
config.headers[CLIENT_VERSION_HEADER_NAME] = 'craftgate-node-client:1.0.67';
if (this._options.language) {
config.headers[LANGUAGE_HEADER_NAME] = this._options.language;
}
Expand Down
4 changes: 2 additions & 2 deletions test/lib/HttpClient.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ test('HttpClient::get() should not add an unnecessary body property to the reque

mock.onGet('/foo')
.reply(config => {
if (!config.hasOwnProperty('data') || typeof config.data === 'undefined') {
if (!Object.prototype.hasOwnProperty.call(config, 'data') || typeof config.data === 'undefined') {
return [200, 'ok'];
}

Expand All @@ -76,7 +76,7 @@ test('HttpClient::delete() should not add an unnecessary body property to the re

mock.onDelete('/foo')
.reply(config => {
if (!config.hasOwnProperty('data') || typeof config.data === 'undefined') {
if (!Object.prototype.hasOwnProperty.call(config, 'data') || typeof config.data === 'undefined') {
return [200, 'ok'];
}

Expand Down
Loading