perf: config fe

This commit is contained in:
archer
2023-07-19 11:17:08 +08:00
parent 47af8d1c3d
commit c46a37541c
10 changed files with 52 additions and 50 deletions

View File

@@ -33,7 +33,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
await connectToDatabase();
// register switch
if (type === UserAuthTypeEnum.register && !global.feConfigs.show_register) {
if (type === UserAuthTypeEnum.register && !global.feConfigs?.show_register) {
throw new Error('Register is closed');
}