移除pansou在server-config中的信息
This commit is contained in:
@@ -300,6 +300,9 @@ interface SiteConfig {
|
|||||||
DanmakuApiToken: string;
|
DanmakuApiToken: string;
|
||||||
TMDBApiKey?: string;
|
TMDBApiKey?: string;
|
||||||
TMDBProxy?: string;
|
TMDBProxy?: string;
|
||||||
|
PansouApiUrl?: string;
|
||||||
|
PansouUsername?: string;
|
||||||
|
PansouPassword?: string;
|
||||||
EnableComments: boolean;
|
EnableComments: boolean;
|
||||||
EnableRegistration?: boolean;
|
EnableRegistration?: boolean;
|
||||||
RegistrationRequireTurnstile?: boolean;
|
RegistrationRequireTurnstile?: boolean;
|
||||||
|
|||||||
@@ -46,10 +46,6 @@ export async function GET(request: NextRequest) {
|
|||||||
EnableOIDCLogin: config.SiteConfig.EnableOIDCLogin || false,
|
EnableOIDCLogin: config.SiteConfig.EnableOIDCLogin || false,
|
||||||
EnableOIDCRegistration: config.SiteConfig.EnableOIDCRegistration || false,
|
EnableOIDCRegistration: config.SiteConfig.EnableOIDCRegistration || false,
|
||||||
OIDCButtonText: config.SiteConfig.OIDCButtonText || '',
|
OIDCButtonText: config.SiteConfig.OIDCButtonText || '',
|
||||||
SiteConfig: {
|
|
||||||
PansouApiUrl: config.SiteConfig.PansouApiUrl || '',
|
|
||||||
// 不暴露用户名和密码,认证在后端处理
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
return NextResponse.json(result);
|
return NextResponse.json(result);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ export default function PansouSearch({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const cloudTypes = Object.keys(results.merged_by_type);
|
const cloudTypes = Object.keys(results.merged_by_type || {});
|
||||||
|
|
||||||
// 过滤显示的网盘类型
|
// 过滤显示的网盘类型
|
||||||
const filteredCloudTypes = selectedType === 'all'
|
const filteredCloudTypes = selectedType === 'all'
|
||||||
@@ -164,7 +164,7 @@ export default function PansouSearch({
|
|||||||
// 计算每种网盘类型的数量
|
// 计算每种网盘类型的数量
|
||||||
const typeStats = cloudTypes.map(type => ({
|
const typeStats = cloudTypes.map(type => ({
|
||||||
type,
|
type,
|
||||||
count: results.merged_by_type[type]?.length || 0,
|
count: results.merged_by_type?.[type]?.length || 0,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -208,7 +208,7 @@ export default function PansouSearch({
|
|||||||
|
|
||||||
{/* 按网盘类型分类显示 */}
|
{/* 按网盘类型分类显示 */}
|
||||||
{filteredCloudTypes.map((cloudType) => {
|
{filteredCloudTypes.map((cloudType) => {
|
||||||
const links = results.merged_by_type[cloudType];
|
const links = results.merged_by_type?.[cloudType];
|
||||||
if (!links || links.length === 0) return null;
|
if (!links || links.length === 0) return null;
|
||||||
|
|
||||||
const typeName = CLOUD_TYPE_NAMES[cloudType] || cloudType;
|
const typeName = CLOUD_TYPE_NAMES[cloudType] || cloudType;
|
||||||
|
|||||||
Reference in New Issue
Block a user