shoceshop-client
Advanced tools
Comparing version 0.35.0 to 0.35.1
@@ -24,9 +24,17 @@ 'use strict'; | ||
function AjaxClient() { | ||
function AjaxClient(options) { | ||
_classCallCheck(this, AjaxClient); | ||
return _possibleConstructorReturn(this, (AjaxClient.__proto__ || Object.getPrototypeOf(AjaxClient)).apply(this, arguments)); | ||
var _this = _possibleConstructorReturn(this, (AjaxClient.__proto__ || Object.getPrototypeOf(AjaxClient)).call(this, options)); | ||
_this.locale = 'en'; | ||
return _this; | ||
} | ||
_createClass(AjaxClient, [{ | ||
key: 'setLocale', | ||
value: function setLocale(locale) { | ||
this.locale = locale; | ||
} | ||
}, { | ||
key: 'getConfig', | ||
@@ -38,3 +46,4 @@ value: function getConfig(method, data, cookie) { | ||
headers: { | ||
'Content-Type': 'application/json' | ||
'Content-Type': 'application/json', | ||
'Accept-Language': this.locale | ||
} | ||
@@ -41,0 +50,0 @@ }; |
@@ -7,2 +7,4 @@ 'use strict'; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
var _crossFetch = require('cross-fetch'); | ||
@@ -27,8 +29,18 @@ | ||
function ApiClient() { | ||
function ApiClient(options) { | ||
_classCallCheck(this, ApiClient); | ||
return _possibleConstructorReturn(this, (ApiClient.__proto__ || Object.getPrototypeOf(ApiClient)).apply(this, arguments)); | ||
var _this = _possibleConstructorReturn(this, (ApiClient.__proto__ || Object.getPrototypeOf(ApiClient)).call(this, options)); | ||
_this.locale = 'en'; | ||
return _this; | ||
} | ||
_createClass(ApiClient, [{ | ||
key: 'setLocale', | ||
value: function setLocale(locale) { | ||
this.locale = locale; | ||
} | ||
}]); | ||
return ApiClient; | ||
@@ -41,3 +53,4 @@ }(_restClient2.default); | ||
headers: { | ||
'Content-Type': 'application/json' | ||
'Content-Type': 'application/json', | ||
'Accept-Language': undefined.locale | ||
}, | ||
@@ -44,0 +57,0 @@ body: JSON.stringify({ email: email }) |
{ | ||
"name": "shoceshop-client", | ||
"version": "0.35.0", | ||
"version": "0.35.1", | ||
"description": "Cezerin2 API client library. Work on browser and server.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
102726
1967