mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-02-21 17:24:41 +08:00
feat: add global douban proxy config
This commit is contained in:
@@ -34,12 +34,14 @@ export async function POST(request: NextRequest) {
|
||||
SearchDownstreamMaxPage,
|
||||
SiteInterfaceCacheTime,
|
||||
ImageProxy,
|
||||
DoubanProxy,
|
||||
} = body as {
|
||||
SiteName: string;
|
||||
Announcement: string;
|
||||
SearchDownstreamMaxPage: number;
|
||||
SiteInterfaceCacheTime: number;
|
||||
ImageProxy: string;
|
||||
DoubanProxy: string;
|
||||
};
|
||||
|
||||
// 参数校验
|
||||
@@ -48,7 +50,8 @@ export async function POST(request: NextRequest) {
|
||||
typeof Announcement !== 'string' ||
|
||||
typeof SearchDownstreamMaxPage !== 'number' ||
|
||||
typeof SiteInterfaceCacheTime !== 'number' ||
|
||||
typeof ImageProxy !== 'string'
|
||||
typeof ImageProxy !== 'string' ||
|
||||
typeof DoubanProxy !== 'string'
|
||||
) {
|
||||
return NextResponse.json({ error: '参数格式错误' }, { status: 400 });
|
||||
}
|
||||
@@ -74,6 +77,7 @@ export async function POST(request: NextRequest) {
|
||||
SearchDownstreamMaxPage,
|
||||
SiteInterfaceCacheTime,
|
||||
ImageProxy,
|
||||
DoubanProxy,
|
||||
};
|
||||
|
||||
// 写入数据库
|
||||
|
||||
Reference in New Issue
Block a user