mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-03-15 02:27:29 +08:00
feat: add local settings
This commit is contained in:
@@ -33,13 +33,11 @@ export async function POST(request: NextRequest) {
|
||||
Announcement,
|
||||
SearchDownstreamMaxPage,
|
||||
SiteInterfaceCacheTime,
|
||||
SearchResultDefaultAggregate,
|
||||
} = body as {
|
||||
SiteName: string;
|
||||
Announcement: string;
|
||||
SearchDownstreamMaxPage: number;
|
||||
SiteInterfaceCacheTime: number;
|
||||
SearchResultDefaultAggregate: boolean;
|
||||
};
|
||||
|
||||
// 参数校验
|
||||
@@ -47,8 +45,7 @@ export async function POST(request: NextRequest) {
|
||||
typeof SiteName !== 'string' ||
|
||||
typeof Announcement !== 'string' ||
|
||||
typeof SearchDownstreamMaxPage !== 'number' ||
|
||||
typeof SiteInterfaceCacheTime !== 'number' ||
|
||||
typeof SearchResultDefaultAggregate !== 'boolean'
|
||||
typeof SiteInterfaceCacheTime !== 'number'
|
||||
) {
|
||||
return NextResponse.json({ error: '参数格式错误' }, { status: 400 });
|
||||
}
|
||||
@@ -73,7 +70,6 @@ export async function POST(request: NextRequest) {
|
||||
Announcement,
|
||||
SearchDownstreamMaxPage,
|
||||
SiteInterfaceCacheTime,
|
||||
SearchResultDefaultAggregate,
|
||||
};
|
||||
|
||||
// 写入数据库
|
||||
|
||||
Reference in New Issue
Block a user