mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-02-18 15:04:41 +08:00
feat: disable register
This commit is contained in:
@@ -18,7 +18,6 @@ export interface AdminConfig {
|
||||
FluidSearch: boolean;
|
||||
};
|
||||
UserConfig: {
|
||||
AllowRegister: boolean;
|
||||
Users: {
|
||||
username: string;
|
||||
role: 'user' | 'admin' | 'owner';
|
||||
|
||||
@@ -172,7 +172,6 @@ async function getInitConfig(configFile: string, subConfig: {
|
||||
process.env.NEXT_PUBLIC_FLUID_SEARCH !== 'false',
|
||||
},
|
||||
UserConfig: {
|
||||
AllowRegister: process.env.NEXT_PUBLIC_ENABLE_REGISTER === 'true',
|
||||
Users: [],
|
||||
},
|
||||
SourceConfig: [],
|
||||
@@ -251,7 +250,7 @@ export async function getConfig(): Promise<AdminConfig> {
|
||||
export function configSelfCheck(adminConfig: AdminConfig): AdminConfig {
|
||||
// 确保必要的属性存在和初始化
|
||||
if (!adminConfig.UserConfig) {
|
||||
adminConfig.UserConfig = { AllowRegister: false, Users: [] };
|
||||
adminConfig.UserConfig = { Users: [] };
|
||||
}
|
||||
if (!adminConfig.UserConfig.Users || !Array.isArray(adminConfig.UserConfig.Users)) {
|
||||
adminConfig.UserConfig.Users = [];
|
||||
|
||||
@@ -58,9 +58,6 @@ async function searchWithCache(
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
if (apiSite.key === 'xiaomaomi') {
|
||||
console.log(data);
|
||||
}
|
||||
if (
|
||||
!data ||
|
||||
!data.list ||
|
||||
|
||||
Reference in New Issue
Block a user