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 <noreply@anthropic.com>
This commit is contained in:
1 parent
33b9076cd3
commit
e6baaddca6
1 file changed
+6
-3
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user