增加动漫数据源配置
This commit is contained in:
@@ -46,6 +46,10 @@ export async function POST(request: NextRequest) {
|
||||
TMDBApiKey,
|
||||
TMDBProxy,
|
||||
TMDBReverseProxy,
|
||||
BangumiDataSource,
|
||||
BangumiApiBaseUrl,
|
||||
BangumiImageBaseUrl,
|
||||
BangumiProxy,
|
||||
BannerDataSource,
|
||||
RecommendationDataSource,
|
||||
PansouApiUrl,
|
||||
@@ -95,6 +99,10 @@ export async function POST(request: NextRequest) {
|
||||
TMDBApiKey?: string;
|
||||
TMDBProxy?: string;
|
||||
TMDBReverseProxy?: string;
|
||||
BangumiDataSource?: 'direct' | 'server-proxy' | 'custom-baseurl';
|
||||
BangumiApiBaseUrl?: string;
|
||||
BangumiImageBaseUrl?: string;
|
||||
BangumiProxy?: string;
|
||||
BannerDataSource?: string;
|
||||
RecommendationDataSource?: string;
|
||||
PansouApiUrl?: string;
|
||||
@@ -149,33 +157,63 @@ export async function POST(request: NextRequest) {
|
||||
typeof DanmakuAutoLoadDefault !== 'boolean') ||
|
||||
(TMDBApiKey !== undefined && typeof TMDBApiKey !== 'string') ||
|
||||
(TMDBProxy !== undefined && typeof TMDBProxy !== 'string') ||
|
||||
(TMDBReverseProxy !== undefined && typeof TMDBReverseProxy !== 'string') ||
|
||||
(BannerDataSource !== undefined && typeof BannerDataSource !== 'string') ||
|
||||
(RecommendationDataSource !== undefined && typeof RecommendationDataSource !== 'string') ||
|
||||
(PansouKeywordBlocklist !== undefined && typeof PansouKeywordBlocklist !== 'string') ||
|
||||
(TMDBReverseProxy !== undefined &&
|
||||
typeof TMDBReverseProxy !== 'string') ||
|
||||
(BangumiDataSource !== undefined &&
|
||||
BangumiDataSource !== 'direct' &&
|
||||
BangumiDataSource !== 'server-proxy' &&
|
||||
BangumiDataSource !== 'custom-baseurl') ||
|
||||
(BangumiApiBaseUrl !== undefined &&
|
||||
typeof BangumiApiBaseUrl !== 'string') ||
|
||||
(BangumiImageBaseUrl !== undefined &&
|
||||
typeof BangumiImageBaseUrl !== 'string') ||
|
||||
(BangumiProxy !== undefined && typeof BangumiProxy !== 'string') ||
|
||||
(BannerDataSource !== undefined &&
|
||||
typeof BannerDataSource !== 'string') ||
|
||||
(RecommendationDataSource !== undefined &&
|
||||
typeof RecommendationDataSource !== 'string') ||
|
||||
(PansouKeywordBlocklist !== undefined &&
|
||||
typeof PansouKeywordBlocklist !== 'string') ||
|
||||
(MagnetProxy !== undefined && typeof MagnetProxy !== 'string') ||
|
||||
(MagnetMikanReverseProxy !== undefined && typeof MagnetMikanReverseProxy !== 'string') ||
|
||||
(MagnetDmhyReverseProxy !== undefined && typeof MagnetDmhyReverseProxy !== 'string') ||
|
||||
(MagnetAcgripReverseProxy !== undefined && typeof MagnetAcgripReverseProxy !== 'string') ||
|
||||
(MagnetMikanReverseProxy !== undefined &&
|
||||
typeof MagnetMikanReverseProxy !== 'string') ||
|
||||
(MagnetDmhyReverseProxy !== undefined &&
|
||||
typeof MagnetDmhyReverseProxy !== 'string') ||
|
||||
(MagnetAcgripReverseProxy !== undefined &&
|
||||
typeof MagnetAcgripReverseProxy !== 'string') ||
|
||||
typeof EnableComments !== 'boolean' ||
|
||||
(CustomAdFilterCode !== undefined && typeof CustomAdFilterCode !== 'string') ||
|
||||
(CustomAdFilterVersion !== undefined && typeof CustomAdFilterVersion !== 'number') ||
|
||||
(EnableRegistration !== undefined && typeof EnableRegistration !== 'boolean') ||
|
||||
(RequireRegistrationInviteCode !== undefined && typeof RequireRegistrationInviteCode !== 'boolean') ||
|
||||
(RegistrationInviteCode !== undefined && typeof RegistrationInviteCode !== 'string') ||
|
||||
(RegistrationRequireTurnstile !== undefined && typeof RegistrationRequireTurnstile !== 'boolean') ||
|
||||
(LoginRequireTurnstile !== undefined && typeof LoginRequireTurnstile !== 'boolean') ||
|
||||
(TurnstileSiteKey !== undefined && typeof TurnstileSiteKey !== 'string') ||
|
||||
(TurnstileSecretKey !== undefined && typeof TurnstileSecretKey !== 'string') ||
|
||||
(CustomAdFilterCode !== undefined &&
|
||||
typeof CustomAdFilterCode !== 'string') ||
|
||||
(CustomAdFilterVersion !== undefined &&
|
||||
typeof CustomAdFilterVersion !== 'number') ||
|
||||
(EnableRegistration !== undefined &&
|
||||
typeof EnableRegistration !== 'boolean') ||
|
||||
(RequireRegistrationInviteCode !== undefined &&
|
||||
typeof RequireRegistrationInviteCode !== 'boolean') ||
|
||||
(RegistrationInviteCode !== undefined &&
|
||||
typeof RegistrationInviteCode !== 'string') ||
|
||||
(RegistrationRequireTurnstile !== undefined &&
|
||||
typeof RegistrationRequireTurnstile !== 'boolean') ||
|
||||
(LoginRequireTurnstile !== undefined &&
|
||||
typeof LoginRequireTurnstile !== 'boolean') ||
|
||||
(TurnstileSiteKey !== undefined &&
|
||||
typeof TurnstileSiteKey !== 'string') ||
|
||||
(TurnstileSecretKey !== undefined &&
|
||||
typeof TurnstileSecretKey !== 'string') ||
|
||||
(DefaultUserTags !== undefined && !Array.isArray(DefaultUserTags)) ||
|
||||
(EnableOIDCLogin !== undefined && typeof EnableOIDCLogin !== 'boolean') ||
|
||||
(EnableOIDCRegistration !== undefined && typeof EnableOIDCRegistration !== 'boolean') ||
|
||||
(EnableOIDCRegistration !== undefined &&
|
||||
typeof EnableOIDCRegistration !== 'boolean') ||
|
||||
(OIDCIssuer !== undefined && typeof OIDCIssuer !== 'string') ||
|
||||
(OIDCAuthorizationEndpoint !== undefined && typeof OIDCAuthorizationEndpoint !== 'string') ||
|
||||
(OIDCTokenEndpoint !== undefined && typeof OIDCTokenEndpoint !== 'string') ||
|
||||
(OIDCUserInfoEndpoint !== undefined && typeof OIDCUserInfoEndpoint !== 'string') ||
|
||||
(OIDCAuthorizationEndpoint !== undefined &&
|
||||
typeof OIDCAuthorizationEndpoint !== 'string') ||
|
||||
(OIDCTokenEndpoint !== undefined &&
|
||||
typeof OIDCTokenEndpoint !== 'string') ||
|
||||
(OIDCUserInfoEndpoint !== undefined &&
|
||||
typeof OIDCUserInfoEndpoint !== 'string') ||
|
||||
(OIDCClientId !== undefined && typeof OIDCClientId !== 'string') ||
|
||||
(OIDCClientSecret !== undefined && typeof OIDCClientSecret !== 'string') ||
|
||||
(OIDCClientSecret !== undefined &&
|
||||
typeof OIDCClientSecret !== 'string') ||
|
||||
(OIDCButtonText !== undefined && typeof OIDCButtonText !== 'string') ||
|
||||
(OIDCMinTrustLevel !== undefined && typeof OIDCMinTrustLevel !== 'number')
|
||||
) {
|
||||
@@ -211,6 +249,10 @@ export async function POST(request: NextRequest) {
|
||||
TMDBApiKey,
|
||||
TMDBProxy,
|
||||
TMDBReverseProxy,
|
||||
BangumiDataSource,
|
||||
BangumiApiBaseUrl,
|
||||
BangumiImageBaseUrl,
|
||||
BangumiProxy,
|
||||
BannerDataSource,
|
||||
RecommendationDataSource,
|
||||
PansouApiUrl,
|
||||
|
||||
Reference in New Issue
Block a user