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