mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-02 08:05:58 +08:00
remove office
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/office"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
func NewOffice(c discoveryregistry.SvcDiscoveryRegistry) *Office {
|
||||
conn, err := c.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImOfficeName)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return &Office{conn: conn}
|
||||
}
|
||||
|
||||
type Office struct {
|
||||
conn *grpc.ClientConn
|
||||
}
|
||||
|
||||
func (o *Office) client(ctx context.Context) (office.OfficeClient, error) {
|
||||
return office.NewOfficeClient(o.conn), nil
|
||||
}
|
||||
@@ -170,11 +170,5 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive
|
||||
conversationGroup.POST("/get_conversations_has_read_and_max_seq", c.GetConversationsHasReadAndMaxSeq)
|
||||
conversationGroup.POST("/set_conversations", c.SetConversations)
|
||||
}
|
||||
|
||||
office := r.Group("/office")
|
||||
{
|
||||
o := NewOffice(discov)
|
||||
_, _ = office, o
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user