()
| 436 | } |
| 437 | |
| 438 | async function fetchPromotions() { |
| 439 | try { |
| 440 | const res = await fetch(`${config.API_BASE}/promotions`); |
| 441 | if (res.ok) { |
| 442 | const data = await res.json(); |
| 443 | if (Array.isArray(data)) { |
| 444 | localStorage.setItem("cached_promotions", JSON.stringify(data)); |
| 445 | } |
| 446 | } |
| 447 | } catch (err) { |
| 448 | console.debug("Failed to fetch promotions:", err); |
| 449 | } |
| 450 | } |
| 451 | |
| 452 | async function setDebugInfo() { |
| 453 | const { version, versionCode } = BuildInfo; |