fix: gendocs panic — config.Get() nil 守卫防止未初始化时访问 Logging.Development
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -55,7 +55,7 @@ func RegisterPersonalCustomerRoutes(router fiber.Router, doc *openapi.Generator,
|
||||
})
|
||||
|
||||
// 开发模式测试登录接口(仅 logging.development=true 时注册)
|
||||
if config.Get().Logging.Development {
|
||||
if cfg := config.Get(); cfg != nil && cfg.Logging.Development {
|
||||
Register(router, doc, basePath, "POST", authBasePath+"/dev-login", handlers.ClientAuth.DevLogin, RouteSpec{
|
||||
Summary: "开发环境测试登录",
|
||||
Description: "⚠️ 仅开发模式可用。传入资产标识符(ICCID等),自动绑定测试客户并签发 JWT,用于接口测试。",
|
||||
|
||||
Reference in New Issue
Block a user