新增弹幕功能

This commit is contained in:
mtvpls
2025-12-02 01:00:42 +08:00
parent 106e966931
commit 9bccf564ee
19 changed files with 2094 additions and 26 deletions

View File

@@ -39,6 +39,8 @@ export async function POST(request: NextRequest) {
DoubanImageProxy,
DisableYellowFilter,
FluidSearch,
DanmakuApiBase,
DanmakuApiToken,
} = body as {
SiteName: string;
Announcement: string;
@@ -50,6 +52,8 @@ export async function POST(request: NextRequest) {
DoubanImageProxy: string;
DisableYellowFilter: boolean;
FluidSearch: boolean;
DanmakuApiBase: string;
DanmakuApiToken: string;
};
// 参数校验
@@ -63,7 +67,9 @@ export async function POST(request: NextRequest) {
typeof DoubanImageProxyType !== 'string' ||
typeof DoubanImageProxy !== 'string' ||
typeof DisableYellowFilter !== 'boolean' ||
typeof FluidSearch !== 'boolean'
typeof FluidSearch !== 'boolean' ||
typeof DanmakuApiBase !== 'string' ||
typeof DanmakuApiToken !== 'string'
) {
return NextResponse.json({ error: '参数格式错误' }, { status: 400 });
}
@@ -93,6 +99,8 @@ export async function POST(request: NextRequest) {
DoubanImageProxy,
DisableYellowFilter,
FluidSearch,
DanmakuApiBase,
DanmakuApiToken,
};
// 写入数据库