fix: fallback to user-provided title when AbleSign API omits it
Some checks are pending
release / meta (push) Waiting to run
release / build (push) Blocked by required conditions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Mitchell R 2026-05-27 03:42:32 +02:00
parent 88bf4645f6
commit 69450de009

View file

@ -122,18 +122,19 @@ export function registerAbleSignRoutes(app: H3, deps: AdminDeps): void {
screenToken = poll.screenToken; screenToken = poll.screenToken;
} catch { /* token may not be ready yet — kiosk can work without it initially */ } } catch { /* token may not be ready yet — kiosk can work without it initially */ }
const screenTitle = screen.title || title;
const screenRowId = await deps.repo.createAbleSignScreen({ const screenRowId = await deps.repo.createAbleSignScreen({
account_id: accountId, account_id: accountId,
ablesign_screen_id: String(screen.id), ablesign_screen_id: String(screen.id),
ablesign_screen_token_encrypted: screenToken ablesign_screen_token_encrypted: screenToken
? deps.secrets.encryptString(screenToken, "ablesign-token") ? deps.secrets.encryptString(screenToken, "ablesign-token")
: undefined, : undefined,
title: screen.title, title: screenTitle,
orientation: screen.orientation, orientation: screen.orientation || "landscape",
}); });
await deps.repo.createEntity({ await deps.repo.createEntity({
name: `AbleSign: ${screen.title}`, name: `AbleSign: ${screenTitle}`,
type: "ablesign", type: "ablesign",
description: `AbleSign screen (ID: ${String(screen.id)})`, description: `AbleSign screen (ID: ${String(screen.id)})`,
web_url: "https://player.ablesign.tv", web_url: "https://player.ablesign.tv",