From e6baaddca6bc774991d52777d1207b25d212979e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Tonh=C3=A4user?= Date: Mon, 10 Aug 2026 23:55:40 +0200 Subject: [PATCH] fix(preflight): check /api/albums instead of removed /api/server-info/ping Current Immich removed /api/server-info/ping (returns 404 'Cannot GET /api/server-info/ping'), so the preflight IMMICH check always failed even though the API and key are fine. /api/albums is the endpoint the portal actually depends on and requires a valid key with album.read scope, so a 200 there confirms reachability + auth. Co-Authored-By: Claude --- scripts/preflight.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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,