diff --git a/src/editor/engine/GameRuntime.js b/src/editor/engine/GameRuntime.js index 869032c..6a9bd71 100644 --- a/src/editor/engine/GameRuntime.js +++ b/src/editor/engine/GameRuntime.js @@ -4442,7 +4442,8 @@ export class GameRuntime { if (!url) return; try { fetch(url, { - method: 'POST', headers: { 'Content-Type': 'application/json' }, + method: 'POST', + headers: this._economyAuthHeaders(), // JWT игрока (иначе 401) body: JSON.stringify({ data }), }).catch(() => {}); } catch (e) { /* ignore */ } @@ -4451,7 +4452,8 @@ export class GameRuntime { loadProgress(namespace, cb) { const url = this._saveBaseUrl(namespace); if (!url) { cb && cb(null); return; } - fetch(url).then(r => r.json()) + fetch(url, { headers: this._economyAuthHeaders() }) + .then(r => r.json()) .then(j => cb && cb(j.data ?? null)) .catch(() => cb && cb(null)); }