mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-27 03:56:33 +00:00
fix: fallback to user-provided title when AbleSign API omits it
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
88bf4645f6
commit
69450de009
1 changed files with 4 additions and 3 deletions
|
|
@ -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",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue