bruce-models 1.5.7 → 1.5.9

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.
@@ -540,7 +540,7 @@
540
540
  }
541
541
  params.headers = params.headers || {};
542
542
  params.headers = Object.assign({ "Content-Type": "application/json;" }, params.headers);
543
- if (this.ssidHeader) {
543
+ if (this.ssidHeader && this.ssid) {
544
544
  params.headers[this.ssidHeader] = this.ssid;
545
545
  }
546
546
  const res = yield fetch(url, {
@@ -555,7 +555,10 @@
555
555
  params = {};
556
556
  }
557
557
  params.headers = params.headers || {};
558
- params.headers = Object.assign({ "Content-Type": "application/json;", [this.ssidHeader]: this.ssid }, params.headers);
558
+ params.headers = Object.assign({ "Content-Type": "application/json;" }, params.headers);
559
+ if (this.ssidHeader && this.ssid) {
560
+ params.headers[this.ssidHeader] = this.ssid;
561
+ }
559
562
  const res = yield fetch(url, {
560
563
  headers: params.headers,
561
564
  method: "DELETE"
@@ -569,7 +572,10 @@
569
572
  params = {};
570
573
  }
571
574
  params.headers = params.headers || {};
572
- params.headers = Object.assign({ "Content-Type": "application/json;", [this.ssidHeader]: this.ssid }, params.headers);
575
+ params.headers = Object.assign({ "Content-Type": "application/json;" }, params.headers);
576
+ if (this.ssidHeader && this.ssid) {
577
+ params.headers[this.ssidHeader] = this.ssid;
578
+ }
573
579
  if (!data) {
574
580
  data = {};
575
581
  }
@@ -590,7 +596,10 @@
590
596
  params = {};
591
597
  }
592
598
  params.headers = params.headers || {};
593
- params.headers = Object.assign({ "Content-Type": "application/json;", [this.ssidHeader]: this.ssid }, params.headers);
599
+ params.headers = Object.assign({ "Content-Type": "application/json;" }, params.headers);
600
+ if (this.ssidHeader && this.ssid) {
601
+ params.headers[this.ssidHeader] = this.ssid;
602
+ }
594
603
  if (!data) {
595
604
  data = {};
596
605
  }
@@ -644,7 +653,7 @@
644
653
  }
645
654
  };
646
655
  xhr.open("POST", url, true);
647
- if (this.ssid) {
656
+ if (this.ssidHeader && this.ssid) {
648
657
  xhr.setRequestHeader(this.ssidHeader, this.ssid);
649
658
  }
650
659
  const formData = new FormData();
@@ -691,6 +700,7 @@
691
700
  let EAppId;
692
701
  (function (EAppId) {
693
702
  EAppId["BruceApi"] = "BruceAPI";
703
+ EAppId["Navigator"] = "Navigator";
694
704
  })(EAppId = Account.EAppId || (Account.EAppId = {}));
695
705
  let EStarterContent;
696
706
  (function (EStarterContent) {
@@ -1103,11 +1113,11 @@
1103
1113
  // Attempt to load an account specific base url.
1104
1114
  // This could be one with a region specific endpoint.
1105
1115
  try {
1106
- const { settings } = yield exports.Account.GetAppSettings({
1116
+ const settings = (yield exports.Account.GetAppSettings({
1107
1117
  api: cam,
1108
1118
  accountId: this.accountId,
1109
1119
  appId: exports.Account.EAppId.BruceApi
1110
- });
1120
+ })).settings;
1111
1121
  if (this.loadCancelled) {
1112
1122
  console.warn("BruceApi: Loading was cancelled due to SetBaseUrl being called, not setting regional base url.");
1113
1123
  return;