移除openlist token的输入

This commit is contained in:
mtvpls
2025-12-22 21:38:51 +08:00
parent 0450edf9bc
commit 84fa95fc57
14 changed files with 111 additions and 117 deletions
+6 -2
View File
@@ -264,7 +264,7 @@ async function handleOpenListProxy(request: NextRequest) {
const config = await getConfig();
const openListConfig = config.OpenListConfig;
if (!openListConfig || !openListConfig.URL || !openListConfig.Token) {
if (!openListConfig || !openListConfig.URL || !openListConfig.Username || !openListConfig.Password) {
return NextResponse.json(
{ code: 0, msg: 'OpenList 未配置', list: [] },
{ status: 200 }
@@ -272,7 +272,11 @@ async function handleOpenListProxy(request: NextRequest) {
}
const rootPath = openListConfig.RootPath || '/';
const client = new OpenListClient(openListConfig.URL, openListConfig.Token);
const client = new OpenListClient(
openListConfig.URL,
openListConfig.Username,
openListConfig.Password
);
// 读取 metainfo (从数据库或缓存)
let metaInfo: MetaInfo | null = getCachedMetaInfo(rootPath);