fix(be): 登记 wechat.msg_token 默认值,让 PETS_WECHAT_MSG_TOKEN 能覆盖

viper AutomaticEnv 只对已登记的 key 生效,纯 .env 部署下未登记的
key 绑不上,会静默取空值。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Blizzard
2026-07-30 19:04:38 +08:00
parent 67b97e4b38
commit 6bb327e62e
+1
View File
@@ -118,6 +118,7 @@ func setDefaults(v *viper.Viper) {
v.SetDefault("wechat.app_id", "")
v.SetDefault("wechat.app_secret", "")
v.SetDefault("wechat.msg_token", "") // 用 PETS_WECHAT_MSG_TOKEN 覆盖
v.SetDefault("auth.dev_login", false)