feat: add configurable video AI links

This commit is contained in:
2026-06-04 11:11:36 +02:00
parent 9dddaffdd4
commit ab5a967fe4
6 changed files with 183 additions and 0 deletions
+12
View File
@@ -71,6 +71,18 @@ export async function getServerStatus(
return (await resp.json()) as ServerStatus;
}
export interface ConfigResponse {
videoAiLinks: import("./types").VideoAiLink[];
}
export async function getConfig(signal?: AbortSignal): Promise<ConfigResponse> {
const resp = await fetch(`${API_BASE}/api/config`, { signal });
if (!resp.ok) {
throw new Error(`Server config check failed (${resp.status} ${resp.statusText})`);
}
return (await resp.json()) as ConfigResponse;
}
export interface GenerateOptions {
signal?: AbortSignal;
}