diff --git a/src/app/api/admin/music/route.ts b/src/app/api/admin/music/route.ts index a309439..979004d 100644 --- a/src/app/api/admin/music/route.ts +++ b/src/app/api/admin/music/route.ts @@ -37,6 +37,7 @@ export async function POST(request: NextRequest) { OpenListCacheUsername, OpenListCachePassword, OpenListCachePath, + OpenListCacheProxyEnabled, } = body as { TuneHubEnabled?: boolean; TuneHubBaseUrl?: string; @@ -46,6 +47,7 @@ export async function POST(request: NextRequest) { OpenListCacheUsername?: string; OpenListCachePassword?: string; OpenListCachePath?: string; + OpenListCacheProxyEnabled?: boolean; }; // 参数校验 @@ -57,7 +59,8 @@ export async function POST(request: NextRequest) { (OpenListCacheURL !== undefined && typeof OpenListCacheURL !== 'string') || (OpenListCacheUsername !== undefined && typeof OpenListCacheUsername !== 'string') || (OpenListCachePassword !== undefined && typeof OpenListCachePassword !== 'string') || - (OpenListCachePath !== undefined && typeof OpenListCachePath !== 'string') + (OpenListCachePath !== undefined && typeof OpenListCachePath !== 'string') || + (OpenListCacheProxyEnabled !== undefined && typeof OpenListCacheProxyEnabled !== 'boolean') ) { return NextResponse.json({ error: '参数格式错误' }, { status: 400 }); } @@ -82,6 +85,7 @@ export async function POST(request: NextRequest) { OpenListCacheUsername, OpenListCachePassword, OpenListCachePath, + OpenListCacheProxyEnabled, }; // 写入数据库