FE: refactor apiBase

Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
jokob-sk
2026-01-10 08:46:16 +11:00
parent 49a075ca9d
commit 07277985b1
10 changed files with 76 additions and 92 deletions

View File

@@ -418,8 +418,8 @@ async function renderSmallBoxes() {
// Get data from the server
const apiToken = getSetting("API_TOKEN");
const apiBase = getApiBase();
const url = `${apiBase}/device/${getMac()}?period=${encodeURIComponent(period)}`;
const apiBaseUrl = getApiBase();
const url = `${apiBaseUrl}/device/${getMac()}?period=${encodeURIComponent(period)}`;
const response = await fetch(url, {
method: "GET",