diff --git a/scripts/preflight.ts b/scripts/preflight.ts index 6834c4f..fffe519 100644 --- a/scripts/preflight.ts +++ b/scripts/preflight.ts @@ -144,15 +144,18 @@ async function main() { }); } - // 6. IMMICH — API reachable with the configured key. + // 6. IMMICH — API reachable with the configured key. /api/albums is the + // endpoint the portal actually depends on and it requires a valid key with + // album.read scope, so a 200 here confirms both reachability and auth. The + // older /api/server-info/ping was removed in current Immich (404). try { const apiBase = `${env.IMMICH_BASE_URL.replace(/\/+$/, "")}/api`; - const response = await fetch(`${apiBase}/server-info/ping`, { + const response = await fetch(`${apiBase}/albums`, { headers: { "x-api-key": env.IMMICH_API_KEY }, signal: AbortSignal.timeout(10_000), }); if (response.ok) { - report("IMMICH", { ok: true, detail: `Ping OK — ${apiBase}/server-info/ping` }); + report("IMMICH", { ok: true, detail: `API OK — ${apiBase}/albums (Key gültig)` }); } else { report("IMMICH", { ok: false,