diff --git a/server/websocket/internal/logic/datatransferlogic.go b/server/websocket/internal/logic/datatransferlogic.go index 02071c5c..aaaa07fc 100644 --- a/server/websocket/internal/logic/datatransferlogic.go +++ b/server/websocket/internal/logic/datatransferlogic.go @@ -198,7 +198,7 @@ func (l *DataTransferLogic) checkAuth(r *http.Request) (isAuth bool, userInfo *a claims, err := l.svcCtx.ParseJwtToken(r) // 如果解析JWT token出错,则返回未授权的JSON响应并记录错误消息 if err != nil { - logx.Error(err) + logx.Error("ParseJwtToken err:", err) return false, nil } if claims != nil { @@ -206,12 +206,9 @@ func (l *DataTransferLogic) checkAuth(r *http.Request) (isAuth bool, userInfo *a userInfo, err = auth.GetUserInfoFormMapClaims(claims) // 如果获取用户信息出错,则返回未授权的JSON响应并记录错误消息 if err != nil { - logx.Error(err) + logx.Error("GetUserInfoFormMapClaims err:", err) return false, nil } - //todo 对接登录后要删除 - userInfo.UserId = 39 - userInfo.GuestId = 0 return true, userInfo } //白板用户