diff options
author | Kristofer Hallin <kristofer@sunet.se> | 2022-01-25 15:39:14 +0100 |
---|---|---|
committer | Kristofer Hallin <kristofer@sunet.se> | 2022-01-25 15:39:14 +0100 |
commit | f4d44b76264c32b23d48bb8a3ed728b39d515854 (patch) | |
tree | d70b0e38b063a48d1a25774d6114bbdc2eec671d /src/components | |
parent | d1245f7f2ba2156159a369e8511e85d4e02deedb (diff) |
Dockerize the whole thing.
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/List.js | 4 | ||||
-rw-r--r-- | src/components/Login.js | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/components/List.js b/src/components/List.js index 76270fa..43a9b3c 100644 --- a/src/components/List.js +++ b/src/components/List.js @@ -43,7 +43,7 @@ class List extends React.Component { queryString() { return [ `limit=${process.env.PER_PAGE}`, - `skip=${(this.state.page - 1) * process.env.PER_PAGE}`, + `skip=${(this.state.page - 1) * window.injectedEnv.PER_PAGE}`, this.filterString() ] .filter(x => x !== null) @@ -52,7 +52,7 @@ class List extends React.Component { // Fetch data from external source, update state getData() { - fetch(`${process.env.COLLECTOR_URL}/sc/v0/get?${this.queryString()}`, { + fetch(window.injectedEnv.COLLECTOR_URL + "/sc/v0/get?" + this.queryString(), { headers: { Authorization: "Bearer " + this.props.token } diff --git a/src/components/Login.js b/src/components/Login.js index bc4baec..d0507af 100644 --- a/src/components/Login.js +++ b/src/components/Login.js @@ -26,7 +26,7 @@ class Login extends React.Component { // NOTE: btoa() limits email, password to ASCII login(email, password) { - fetch(process.env.JWT_URL, { + fetch(window.injectedEnv.JWT_URL, { method: "POST", headers: { Authorization: "Basic " + btoa(email + ":" + password) } }) |