@truedat/core 4.48.14 → 4.48.15

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## [4.48.14] 2022-07-29
3
+ ## [4.48.15] 2022-07-29
4
4
 
5
5
  ### Fixed
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/core",
3
- "version": "4.48.14",
3
+ "version": "4.48.15",
4
4
  "description": "Truedat Web Core",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -89,7 +89,7 @@
89
89
  },
90
90
  "dependencies": {
91
91
  "@apollo/client": "^3.6.4",
92
- "axios": "^0.19.2",
92
+ "axios": "^0.27.2",
93
93
  "immutable": "^4.0.0-rc.12",
94
94
  "is-hotkey": "^0.1.6",
95
95
  "is-url": "^1.2.4",
@@ -112,5 +112,5 @@
112
112
  "react-dom": ">= 16.8.6 < 17",
113
113
  "semantic-ui-react": ">= 0.88.2 < 2.1"
114
114
  },
115
- "gitHead": "958a84bddc4a739679ea01e0758b78fa6583e240"
115
+ "gitHead": "5496f65aae0a4a8a78c55bca7812fe3cbc4b57b9"
116
116
  }
@@ -7,7 +7,7 @@ describe("authJsonOpts", () => {
7
7
 
8
8
  it("should include an authorization header with the bearer token", () => {
9
9
  const token = "foo";
10
- const authorization = `Bearer ${token}`;
11
- expect(authJsonOpts(token)).toMatchObject({ headers: { authorization } });
10
+ const Authorization = `Bearer ${token}`;
11
+ expect(authJsonOpts(token)).toMatchObject({ headers: { Authorization } });
12
12
  });
13
13
  });
@@ -15,7 +15,7 @@ const UPLOAD_JSON_OPTS = {
15
15
 
16
16
  const authJsonOpts = (token) =>
17
17
  token
18
- ? { headers: { ...JSON_HEADERS, authorization: `Bearer ${token}` } }
18
+ ? { headers: { ...JSON_HEADERS, Authorization: `Bearer ${token}` } }
19
19
  : JSON_OPTS;
20
20
 
21
21
  const apiJson = (url, opts) =>
@@ -5,17 +5,17 @@ import { clearToken, readToken } from "./storage";
5
5
  // If no authorization header is present and token exists in local storage, put
6
6
  // the bearer token authorization header
7
7
  const maybePutAuthorization = (config) => {
8
- if (config.headers?.authorization) {
8
+ if (config.headers["Authorization"] || config.headers["authorization"]) {
9
9
  return config;
10
10
  } else {
11
11
  const token = readToken();
12
12
  return token === null
13
- ? token
13
+ ? config
14
14
  : {
15
15
  ...config,
16
16
  headers: {
17
17
  ...config.headers,
18
- authorization: `Bearer ${token}`,
18
+ Authorization: `Bearer ${token}`,
19
19
  },
20
20
  };
21
21
  }