feat: 添加 is_adult 字段以支持成人内容标记,更新相关逻辑处理

This commit is contained in:
katelya
2025-09-05 00:57:57 +08:00
parent 24e9dd9b5d
commit 0e8ea7003a
3 changed files with 61 additions and 6 deletions
+3 -1
View File
@@ -59,11 +59,12 @@ export async function POST(request: NextRequest) {
switch (action) {
case 'add': {
const { key, name, api, detail } = body as {
const { key, name, api, detail, is_adult } = body as {
key?: string;
name?: string;
api?: string;
detail?: string;
is_adult?: boolean;
};
if (!key || !name || !api) {
return NextResponse.json({ error: '缺少必要参数' }, { status: 400 });
@@ -78,6 +79,7 @@ export async function POST(request: NextRequest) {
detail,
from: 'custom',
disabled: false,
is_adult: is_adult || false, // 确保处理 is_adult 字段
});
break;
}