()
| 336 | } |
| 337 | |
| 338 | async function loadPublicSiteConfig() { |
| 339 | if (publicSiteConfigPromise) return publicSiteConfigPromise; |
| 340 | publicSiteConfigPromise = fetch(withBasePath('/api/public/siteConfig.php'), { |
| 341 | method: 'GET', |
| 342 | credentials: 'same-origin', |
| 343 | headers: { |
| 344 | Accept: 'application/json' |
| 345 | } |
| 346 | }) |
| 347 | .then(async function (res) { |
| 348 | return res.json().catch(function () { return {}; }); |
| 349 | }) |
| 350 | .catch(function () { |
| 351 | return {}; |
| 352 | }); |
| 353 | return publicSiteConfigPromise; |
| 354 | } |
| 355 | |
| 356 | async function loadPublicAiConfig() { |
| 357 | const siteCfg = await loadPublicSiteConfig(); |
no test coverage detected