perf: config fe

This commit is contained in:
archer
2023-07-19 10:59:49 +08:00
parent 7a76f54148
commit 47af8d1c3d
18 changed files with 340 additions and 230 deletions

View File

@@ -32,6 +32,11 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
await connectToDatabase();
// register switch
if (type === UserAuthTypeEnum.register && !global.feConfigs.show_register) {
throw new Error('Register is closed');
}
const code = nanoid();
// 判断 1 分钟内是否有重复数据