Quite some work done here.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user