MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / fetchPromotions

Function fetchPromotions

src/main.js:438–450  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

436}
437
438async 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
452async function setDebugInfo() {
453 const { version, versionCode } = BuildInfo;

Callers 1

onDeviceReadyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected