added /config endpoint, use fewer globals (#1172)
* added /config endpoint, use fewer globals * fixed integration tests
This commit is contained in:
parent
8df400a676
commit
1c44d1d0f9
15 changed files with 92 additions and 80 deletions
11
app/api.js
11
app/api.js
|
@ -401,3 +401,14 @@ export function sendMetrics(blob) {
|
|||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
export async function getConstants() {
|
||||
const response = await fetch(getApiUrl('/config'));
|
||||
|
||||
if (response.ok) {
|
||||
const obj = await response.json();
|
||||
return obj;
|
||||
}
|
||||
|
||||
throw new Error(response.status);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue