ws-process 0.3.55 → 0.3.57
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/index.js +6 -2
- package/package.json +1 -1
- package/reducer.js +1 -1
package/index.js
CHANGED
|
@@ -603,6 +603,8 @@ function asyncSend(msg) {
|
|
|
603
603
|
|
|
604
604
|
if (!msg.action) {
|
|
605
605
|
let url;
|
|
606
|
+
const user = getState().user.currentUser;
|
|
607
|
+
|
|
606
608
|
if (/^https{0,1}:\/\//.test(msg.url)) {
|
|
607
609
|
url = msg.url;
|
|
608
610
|
} else {
|
|
@@ -624,10 +626,12 @@ function asyncSend(msg) {
|
|
|
624
626
|
if (altDomain) {
|
|
625
627
|
url = [altDomain, msg.url.replace(/^\/{0,}/, '')].join('/');
|
|
626
628
|
} else {
|
|
627
|
-
url = [
|
|
629
|
+
url = [
|
|
630
|
+
user.system?.useApi2 === true ? 'https://api2.bsg.support' : 'https://api.bsg.support',
|
|
631
|
+
msg.url.replace(/^\/{0,}/, ''),
|
|
632
|
+
].join('/');
|
|
628
633
|
}
|
|
629
634
|
}
|
|
630
|
-
const user = getState().user.currentUser;
|
|
631
635
|
const headers = {};
|
|
632
636
|
headers['bsg-support-process-id'] = msg.processID;
|
|
633
637
|
headers['bsg-support-api-key'] = user.apiKey || undefined;
|
package/package.json
CHANGED