feat: add configurable video AI links
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user