feat: add system config item for wechat qrcode

This commit is contained in:
RockYang
2024-01-19 16:58:13 +08:00
parent b317d597ac
commit 3b1544b5e4
7 changed files with 320 additions and 254 deletions

View File

@@ -59,11 +59,13 @@ func main() {
}
debug, _ := strconv.ParseBool(os.Getenv("APP_DEBUG"))
logger.Info("Loading config file: ", configFile)
defer func() {
if err := recover(); err != nil {
logger.Error("Panic Error:", err)
}
}()
if !debug {
defer func() {
if err := recover(); err != nil {
logger.Error("Panic Error:", err)
}
}()
}
app := fx.New(
// 初始化配置应用配置
@@ -378,7 +380,9 @@ func main() {
log.Fatal(err)
}
}),
fx.Invoke(func(h *chatimpl.ChatHandler) {
h.Init()
}),
// 注册生命周期回调函数
fx.Invoke(func(lifecycle fx.Lifecycle, lc *AppLifecycle) {
lifecycle.Append(fx.Hook{