pull/458/head
wangchuxiao 2 years ago
parent 434ca599c5
commit c0af5152f1

@ -157,6 +157,7 @@ func GinParseToken(rdb redis.UniversalClient) gin.HandlerFunc {
} }
} else { } else {
apiresp.GinError(c, errs.ErrTokenNotExist.Wrap()) apiresp.GinError(c, errs.ErrTokenNotExist.Wrap())
c.Abort()
return return
} }
c.Set(constant.OpUserPlatform, constant.PlatformIDToName(claims.PlatformID)) c.Set(constant.OpUserPlatform, constant.PlatformIDToName(claims.PlatformID))

@ -7,13 +7,12 @@ import (
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation"
pbConversation "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation" pbConversation "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation"
"google.golang.org/grpc" "google.golang.org/grpc"
) )
type Conversation struct { type Conversation struct {
Client conversation.ConversationClient Client pbConversation.ConversationClient
conn grpc.ClientConnInterface conn grpc.ClientConnInterface
discov discoveryregistry.SvcDiscoveryRegistry discov discoveryregistry.SvcDiscoveryRegistry
} }
@ -23,7 +22,7 @@ func NewConversation(discov discoveryregistry.SvcDiscoveryRegistry) *Conversatio
if err != nil { if err != nil {
panic(err) panic(err)
} }
client := conversation.NewConversationClient(conn) client := pbConversation.NewConversationClient(conn)
return &Conversation{discov: discov, conn: conn, Client: client} return &Conversation{discov: discov, conn: conn, Client: client}
} }

Loading…
Cancel
Save