From 8a5114ef53b954a0f47d2ed69253a620d5b81bfa Mon Sep 17 00:00:00 2001 From: mtvpls Date: Sun, 11 Jan 2026 16:44:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=BA=90=E4=BF=9D=E7=95=99?= =?UTF-8?q?=E5=85=B3=E9=94=AE=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/api/admin/source/route.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/api/admin/source/route.ts b/src/app/api/admin/source/route.ts index dce01e6..39a5e24 100644 --- a/src/app/api/admin/source/route.ts +++ b/src/app/api/admin/source/route.ts @@ -65,16 +65,16 @@ export async function POST(request: NextRequest) { if (!key || !name || !api) { return NextResponse.json({ error: '缺少必要参数' }, { status: 400 }); } - // 禁止添加 openlist 和 emby 保留关键字 - if (key === 'openlist') { + // 禁止添加保留关键字 + if (key === 'openlist' || key === 'xiaoya') { return NextResponse.json( - { error: 'openlist 是保留关键字,不能作为视频源 key' }, + { error: `${key} 是保留关键字,不能作为视频源 key` }, { status: 400 } ); } - if (key === 'emby') { + if (key.startsWith('emby')) { return NextResponse.json( - { error: 'emby 是保留关键字,不能作为视频源 key' }, + { error: 'emby 开头的 key 是保留关键字,不能作为视频源 key' }, { status: 400 } ); }