fix: docs placement

This commit is contained in:
2026-04-08 13:28:46 +04:00
parent b8f502fdb3
commit 2336f86aa3
5 changed files with 39 additions and 36 deletions
+5 -3
View File
@@ -72,8 +72,10 @@ export const ingest = new Elysia()
const scheduledAt = body.scheduled_at ? new Date(body.scheduled_at) : null;
const jitterMs = body.jitter_ms ?? null;
// Per-region transition state. Empty string = unspecified/single-region.
const region = body.region ?? '';
// Per-region transition state. Region is always populated by current runners;
// legacy null values from older pings collapse to "default" so state and
// notifications never carry an empty label.
const region = body.region && body.region.length > 0 ? body.region : 'default';
const [stateRow] = await sql`
SELECT last_state, consecutive_down, cert_alert_sent
FROM monitor_region_state
@@ -135,7 +137,7 @@ export const ingest = new Elysia()
${important},
${body.error ?? null},
${Object.keys(meta).length > 0 ? sql.json(meta) : null},
${body.region ?? null},
${region},
${body.run_id ?? null}
)
RETURNING *