fix: 修正用户信息获取失败时的状态码

This commit is contained in:
2026-04-23 18:29:30 +08:00
parent 907980c85c
commit b648ee3d92

View File

@@ -92,10 +92,10 @@ func StartServerProxy() {
user, err := utils.GetUserInfo(r.GetCtx()) user, err := utils.GetUserInfo(r.GetCtx())
if err != nil { if err != nil {
g.Log().Errorf(r.GetCtx(), "获取用户信息失败: %v", err) g.Log().Errorf(r.GetCtx(), "获取用户信息失败: %v", err)
r.Response.Status = 500 r.Response.Status = 401
r.Response.WriteJsonExit(map[string]interface{}{ r.Response.WriteJsonExit(map[string]interface{}{
"success": false, "success": false,
"code": 500, "code": 401,
"message": "获取用户信息失败", "message": "获取用户信息失败",
}) })
return return