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

@@ -105,8 +105,8 @@ function loadSessionsData() {
// Build API base
const apiToken = getSetting("API_TOKEN");
const apiBase = getApiBase();
const url = `${apiBase}/sessions/${getMac()}?period=${encodeURIComponent(period)}`;
const apiBaseUrl = getApiBase();
const url = `${apiBaseUrl}/sessions/${getMac()}?period=${encodeURIComponent(period)}`;
// Call API with Authorization header
$.ajax({