fix(badges): reports background fetch guard used wrong field name

$ae_api.api_key does not exist — the field is api_secret_key.
The guard evaluated to true on every render, returning immediately
and never calling search__event_badge. Changed to base_url which
is the standard readiness check per the quickstart doc.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-06-09 12:32:49 -04:00
parent 6dc6be9926
commit 4f74cf1353

View File

@@ -25,7 +25,7 @@ let event_id = $derived(page.params.event_id);
// Fire a background refresh — liveQuery below will reactively pick up new data.
$effect(() => {
const eid = event_id;
if (!eid || !$ae_api?.api_key) return;
if (!eid || !$ae_api?.base_url) return;
// try_cache defaults to true — results are written to IDB so liveQuery picks them up.
events_func.search__event_badge({
api_cfg: $ae_api,