summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2025-12-20 17:36:14 -0500
committerLLLL Colonq <llll@colonq>2025-12-20 17:36:14 -0500
commite16ce1e5dbc6f0b1534abbbc774f4709c9804997 (patch)
treed878bb2a56d7a63195ce81ddb1f27580ae2d7b03
parent0e3bdb5e8ae3b3bb1b8b79fd6225ad73803818c0 (diff)
Use proper API server
-rw-r--r--templates/api/debtclock.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/templates/api/debtclock.html b/templates/api/debtclock.html
index 884205d..d5b284c 100644
--- a/templates/api/debtclock.html
+++ b/templates/api/debtclock.html
@@ -40,12 +40,15 @@
}
</style>
<script type="module">
+ CONFIG_SUBST
+ </script>
+ <script type="module">
let DEBTS_CUR = null;
let DEBTS_PREV = null;
let COUNTER = 0;
setInterval(async () => {
if (COUNTER % 100 == 0 || !DEBTS_CUR || !DEBTS_PREV) {
- const resp = await fetch("http://localhost:8080/api/debt");
+ const resp = await fetch(globalThis.apiServer + "/debt");
const d = await resp.json();
console.log(d);
DEBTS_PREV = DEBTS_CUR;