@nuskin/ns-shop 7.4.0-td-1000.1 → 7.4.0-td-1000.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -296,7 +296,12 @@ async function getEquinoxRequestConfiguration() {
|
|
|
296
296
|
const config = (await getConfiguration(['Equinox_Markets'])).Equinox_Markets;
|
|
297
297
|
|
|
298
298
|
// Use MySite_API_Base_URLs if it is in MySite or MSCART
|
|
299
|
-
const
|
|
299
|
+
const isMysite = cartType === shoppingContextCartTypes.storefront || window.location.hostname.includes(".mynuskin.com");
|
|
300
|
+
const baseURL = isMysite ? config.MySite_API_Base_URLs : config.API_Base_URLs;
|
|
301
|
+
|
|
302
|
+
let mySiteKongURL = baseURL.includes(isMysite ? "storefront" : "apis")
|
|
303
|
+
? baseURL
|
|
304
|
+
: `${baseURL}/orchestrationservices/storefront`;
|
|
300
305
|
|
|
301
306
|
const equinoxMarket = {
|
|
302
307
|
market_name: config.market_name,
|
|
@@ -333,14 +338,9 @@ async function _equinoxRequest(options) {
|
|
|
333
338
|
defaultHeaders.Authorization = `Bearer ${idToken}`;
|
|
334
339
|
}
|
|
335
340
|
|
|
336
|
-
let orchestrationURL = `${mySiteKongURL}/orchestrationservices/storefront/${options.endpoint}`;
|
|
337
|
-
if (mySiteKongURL && mySiteKongURL.indexOf('apis') > -1) {
|
|
338
|
-
orchestrationURL = `${mySiteKongURL}/${options.endpoint}`
|
|
339
|
-
}
|
|
340
|
-
|
|
341
341
|
let axiosRequest = {
|
|
342
342
|
method: options.method,
|
|
343
|
-
url:
|
|
343
|
+
url: `${mySiteKongURL}/${options.endpoint}`,
|
|
344
344
|
headers:{...defaultHeaders, ... options.headers },
|
|
345
345
|
withCredentials: (options.method !== "DELETE"),
|
|
346
346
|
params: (options.params) ? options.params : defaultEquinoxParams
|