Pass base_url

This commit is contained in:
Nathan Barber
2021-12-13 19:55:23 -05:00
parent bb20002aea
commit 3893fb6d2c
5 changed files with 10 additions and 5 deletions

View File

@@ -1,5 +1,7 @@
export const jhapiRequest = (endpoint, method, data) => {
return fetch("/hub/api" + endpoint, {
let base_url = window.base_url,
api_url = `${base_url}hub/api`;
return fetch(api_url + endpoint, {
method: method,
json: true,
headers: {