diff --git a/html/app.js b/html/app.js index 3605b3f0..aa0d7e77 100644 --- a/html/app.js +++ b/html/app.js @@ -463,7 +463,7 @@ if (window.CefSharp) { // API: Config - API.config = {}; + API.cachedConfig = {}; API.$on('CONFIG', function (args) { args.ref = this.updateConfig(args.json); @@ -486,7 +486,7 @@ if (window.CefSharp) { clientApiKey: '', ...ref }; - this.config = ctx; + this.cachedConfig = ctx; return ctx; }; @@ -724,7 +724,7 @@ if (window.CefSharp) { } */ API.login = function (param) { - return this.call(`auth/user?apiKey=${this.config.clientApiKey}`, { + return this.call(`auth/user?apiKey=${this.cachedConfig.clientApiKey}`, { method: 'GET', headers: { Authorization: `Basic ${btoa(encodeURIComponent(`${param.username}:${param.password}`).replace(/%([0-9A-F]{2})/gu, (_, s) => String.fromCharCode(parseInt(s, 16))).replace('%', '%25'))}` @@ -750,7 +750,7 @@ if (window.CefSharp) { } */ API.loginWithSteam = function (param) { - return this.call(`auth/steam?apiKey=${this.config.clientApiKey}`, { + return this.call(`auth/steam?apiKey=${this.cachedConfig.clientApiKey}`, { method: 'POST', body: param }).then((json) => { @@ -807,7 +807,7 @@ if (window.CefSharp) { }; API.getCurrentUser = function () { - return this.call(`auth/user?apiKey=${this.config.clientApiKey}`, { + return this.call(`auth/user?apiKey=${this.cachedConfig.clientApiKey}`, { method: 'GET' }).then((json) => { var args = { diff --git a/html/index.html b/html/index.html index 43ff4aa1..eff556f8 100644 --- a/html/index.html +++ b/html/index.html @@ -252,10 +252,10 @@ - + Search by Category - +
@@ -676,19 +676,19 @@
SDK Unity Version - +
SDK Version - +
SDK URL - +
diff --git a/html/vr.js b/html/vr.js index 7f898b18..2f8abc76 100644 --- a/html/vr.js +++ b/html/vr.js @@ -376,7 +376,7 @@ if (window.CefSharp) { // API: Config - API.config = {}; + API.cachedConfig = {}; API.$on('CONFIG', function (args) { args.ref = this.updateConfig(args.json); @@ -399,7 +399,7 @@ if (window.CefSharp) { clientApiKey: '', ...ref }; - this.config = ctx; + this.cachedConfig = ctx; return ctx; }; @@ -546,7 +546,7 @@ if (window.CefSharp) { } */ API.getWorld = function (param) { - return this.call(`worlds/${param.worldId}?apiKey=${this.config.clientApiKey}`, { + return this.call(`worlds/${param.worldId}?apiKey=${this.cachedConfig.clientApiKey}`, { method: 'GET' }).then((json) => { var args = {