frontend: Add API url config
This commit is contained in:
parent
e10b29e0c6
commit
a0d9c2dbc4
|
@ -172,7 +172,7 @@ class API {
|
|||
async fetch(url, options = {}) {
|
||||
const accessToken = await this.getValidAccessToken()
|
||||
|
||||
const response = await window.fetch('/api' + url, {
|
||||
const response = await window.fetch(config.apiUrl + '/api' + url, {
|
||||
...options,
|
||||
headers: {
|
||||
...(options.headers || {}),
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"apiUrl": "http://localhost:3001",
|
||||
"auth": {
|
||||
"server": "http://localhost:3000",
|
||||
"clientId": "b730f8d2-d93c-4c68-9ff0-dfac8da76ee2",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"apiUrl": "https://api.example.com",
|
||||
"auth": {
|
||||
"server": "https://api.example.com",
|
||||
"clientId": "CHANGEME",
|
||||
|
|
Loading…
Reference in a new issue