mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-07-01 23:57:50 +08:00
update
This commit is contained in:
parent
9f31031a94
commit
56618ddd46
@ -12,7 +12,6 @@ import (
|
||||
pbcrypto "github.com/openimsdk/protocol/crypto"
|
||||
"github.com/openimsdk/protocol/group"
|
||||
"github.com/openimsdk/protocol/msg"
|
||||
pbredpacket "github.com/openimsdk/protocol/redpacket"
|
||||
"github.com/openimsdk/protocol/relation"
|
||||
"github.com/openimsdk/protocol/rtc"
|
||||
"github.com/openimsdk/protocol/third"
|
||||
@ -118,10 +117,7 @@ func newGinRouter(ctx context.Context, client discovery.SvcDiscoveryRegistry, co
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
redpacketConn, err := client.GetConn(ctx, config.Share.RpcRegisterName.RedPacket)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
r := gin.New()
|
||||
if v, ok := binding.Validator.Engine().(*validator.Validate); ok {
|
||||
@ -249,6 +245,9 @@ func newGinRouter(ctx context.Context, client discovery.SvcDiscoveryRegistry, co
|
||||
groupRouterGroup.POST("/get_full_join_group_ids", g.GetFullJoinGroupIDs)
|
||||
groupRouterGroup.POST("/get_group_application_unhandled_count", g.GetGroupApplicationUnhandledCount)
|
||||
groupRouterGroup.POST("/get_common_groups_with_friend", g.GetCommonGroupsWithFriend)
|
||||
groupRouterGroup.POST("/pin_group_message", g.PinGroupMessage)
|
||||
groupRouterGroup.POST("/unpin_group_message", g.UnpinGroupMessage)
|
||||
groupRouterGroup.POST("/get_group_pinned_messages", g.GetGroupPinnedMessages)
|
||||
}
|
||||
// certificate
|
||||
{
|
||||
@ -369,30 +368,6 @@ func newGinRouter(ctx context.Context, client discovery.SvcDiscoveryRegistry, co
|
||||
cryptoGroup.POST("/integrity_report", cr.IntegrityReport)
|
||||
}
|
||||
|
||||
// RedPacket
|
||||
{
|
||||
rp := NewRedPacketApi(pbredpacket.NewRedPacketClient(redpacketConn))
|
||||
redpacketGroup := r.Group("/redpacket")
|
||||
redpacketGroup.POST("/create_order", rp.CreateOrder)
|
||||
redpacketGroup.POST("/created_callback", rp.CreatedCallback)
|
||||
redpacketGroup.POST("/detail", rp.GetDetail)
|
||||
redpacketGroup.POST("/issue_claim_sign", rp.IssueClaimSign)
|
||||
redpacketGroup.POST("/claim_result", rp.ClaimResult)
|
||||
redpacketGroup.POST("/request_refund", rp.RequestRefund)
|
||||
redpacketGroup.POST("/get_refund", rp.GetRefund)
|
||||
redpacketGroup.POST("/wallet_bind/challenge", rp.IssueWalletBindChallenge)
|
||||
redpacketGroup.POST("/wallet_bind/confirm", rp.ConfirmWalletBind)
|
||||
redpacketGroup.POST("/wallet_bind/detail", rp.GetWalletBinding)
|
||||
|
||||
adminGroup := redpacketGroup.Group("/admin")
|
||||
adminGroup.POST("/set_signer", rp.AdminSetSigner)
|
||||
adminGroup.POST("/set_token", rp.AdminSetToken)
|
||||
adminGroup.POST("/set_expiry", rp.AdminSetExpiry)
|
||||
adminGroup.POST("/set_allow_all_tokens", rp.AdminSetAllowAllTokens)
|
||||
adminGroup.POST("/set_native_token_enabled", rp.AdminSetNativeTokenEnabled)
|
||||
adminGroup.POST("/parse_tx_events", rp.AdminParseTxEvents)
|
||||
}
|
||||
|
||||
{
|
||||
statisticsGroup := r.Group("/statistics")
|
||||
statisticsGroup.POST("/user/register", u.UserRegisterCount)
|
||||
|
||||
@ -697,7 +697,7 @@ func (s *friendServer) AddOnewayFriend(ctx context.Context, req *relation.ApplyT
|
||||
if in1 {
|
||||
return nil, servererrs.ErrRelationshipAlready.WrapMsg("already in friend list")
|
||||
}
|
||||
if err := s.db.BecomeOnewayFriend(ctx, req.FromUserID, req.ToUserID, becomeFriendByOneway); err != nil {
|
||||
if err := s.db.BecomeOnewayFriend(ctx, req.FromUserID, req.ToUserID, becomeFriendByOneway, req.Remark); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user