This commit is contained in:
2025-11-30 03:11:24 +01:00
parent da7838e9bc
commit 337f65205d
2 changed files with 189 additions and 152 deletions

View File

@@ -23,7 +23,13 @@
const pidInput = rootSc.querySelector("#sc-pid");
const serialInput = rootSc.querySelector("#sc-serial");
const apiUrl = cfg.apiBase.replace(/\/+$/, "") + "/quickcheck";
// API-Basis:
// - cfg.apiBase kommt aus fakecheck.core.js (z.B. https://api.usbcheck.it)
// - wir hängen /v1/quickcheck dran
// - Fallback: /api/v1/quickcheck auf demselben Host
const apiBaseRaw = (cfg && cfg.apiBase) ? cfg.apiBase : "";
const apiBase = apiBaseRaw.replace(/\/+$/, "");
const apiUrl = apiBase ? (apiBase + "/v1/quickcheck") : "/api/v1/quickcheck";
// -------------------------------------------------------
// Fehleranzeige