添加教程,更新打包文件

删除描述
This commit is contained in:
eoao
2025-04-29 04:49:33 +08:00
parent 59c5be2623
commit de742d31e7
11 changed files with 100 additions and 32 deletions

View File

@@ -2,6 +2,7 @@ import KvConst from '../const/kv-const';
import setting from '../entity/setting';
import orm from '../entity/orm';
import { settingConst } from '../const/entity-const';
import BizError from "../error/biz-error";
const settingService = {
@@ -21,6 +22,11 @@ const settingService = {
},
async set(c, params) {
if (params.registerVerify === 0 || params.addEmailVerify === 0) {
if (!c.env.site_key || !c.env.secret_key) {
throw new BizError('Turnstile密钥未配置,不能开启人机验证')
}
}
await orm(c).update(setting).set({ ...params }).returning().get();
await this.refresh(c);
},