Quite some work done here.

This commit is contained in:
Frank
2026-01-03 22:12:51 +01:00
parent af61a3b920
commit 5b6bfaf5ad
29 changed files with 658 additions and 41 deletions

View File

@@ -69,6 +69,7 @@ document.addEventListener('DOMContentLoaded', async () => {
const topic = cfgEl.dataset.topic;
const apiPingUrl = cfgEl.dataset.apiPingUrl;
const apiEchoUrl = cfgEl.dataset.apiEchoUrl;
const userId = cfgEl.dataset.userId;
if (mercurePublicUrl && topic) {
subscribeToMercure(mercurePublicUrl, topic);
@@ -88,7 +89,7 @@ document.addEventListener('DOMContentLoaded', async () => {
if (apiEchoUrl) {
const echo = await fetchJson(apiEchoUrl, {
method: 'POST',
body: { hello: 'from game1.js', ts: new Date().toISOString() },
body: { message: 'from game1.js', ts: new Date().toISOString(), user: userId },
});
console.log('[API][game1] echo →', echo);
} else {