feat: roughly admin info struct and interface

This commit is contained in:
shinya
2025-07-05 00:29:43 +08:00
parent 44ce8241c6
commit a4c56e2cdd
15 changed files with 1305 additions and 53 deletions

View File

@@ -1,4 +1,4 @@
import { getApiSites } from '@/lib/config';
import { getAvailableApiSites } from '@/lib/config';
import { SearchResult } from '@/lib/types';
import { getDetailFromApi, searchFromApi } from './downstream';
@@ -34,7 +34,7 @@ export async function fetchVideoDetail({
fallbackTitle = '',
}: FetchVideoDetailOptions): Promise<VideoDetail> {
// 优先通过搜索接口查找精确匹配
const apiSites = getApiSites();
const apiSites = getAvailableApiSites();
const apiSite = apiSites.find((site) => site.key === source);
if (!apiSite) {
throw new Error('无效的API来源');