refactor(initdb): 重构数据库初始化逻辑
- 修改 FillInitData 函数签名,增加 ismod 参数用于指示是否成功插入数据 - 在 base 模块初始化中使用 If 函数处理数据库初始化结果 - 优化 login 模块中的日志输出 - 修复 websocket 中的错误处理 - 更新 dict 和 task 模块的初始化逻辑
This commit is contained in:
@@ -12,7 +12,6 @@ import (
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
"github.com/gogf/gf/v2/os/gcmd"
|
||||
"github.com/gogf/gf/v2/os/gfile"
|
||||
"github.com/gogf/gf/v2/os/glog"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -46,6 +45,6 @@ var (
|
||||
)
|
||||
|
||||
func beforeServeHook(r *ghttp.Request) {
|
||||
glog.Debugf(r.GetCtx(), "beforeServeHook [is file:%v] URI:%s", r.IsFileRequest(), r.RequestURI)
|
||||
//glog.Debugf(r.GetCtx(), "beforeServeHook [is file:%v] URI:%s", r.IsFileRequest(), r.RequestURI)
|
||||
r.Response.CORSDefault()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user