mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
api change
This commit is contained in:
parent
c9f326c722
commit
4ce0c6be50
@ -31,7 +31,7 @@ func UserNewestSeq(c *gin.Context) {
|
|||||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err"})
|
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
pbData := pbMsg.GetNewSeqReq{}
|
pbData := pbMsg.GetMaxAndMinSeqReq{}
|
||||||
pbData.UserID = params.SendID
|
pbData.UserID = params.SendID
|
||||||
pbData.OperationID = params.OperationID
|
pbData.OperationID = params.OperationID
|
||||||
grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName)
|
grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName)
|
||||||
@ -40,7 +40,7 @@ func UserNewestSeq(c *gin.Context) {
|
|||||||
log.ErrorByKv("get grpcConn err", pbData.OperationID, "args", params)
|
log.ErrorByKv("get grpcConn err", pbData.OperationID, "args", params)
|
||||||
}
|
}
|
||||||
msgClient := pbMsg.NewChatClient(grpcConn)
|
msgClient := pbMsg.NewChatClient(grpcConn)
|
||||||
reply, err := msgClient.GetNewSeq(context.Background(), &pbData)
|
reply, err := msgClient.GetMaxAndMinSeq(context.Background(), &pbData)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.ErrorByKv("rpc call failed to getNewSeq", pbData.OperationID, "err", err, "pbData", pbData.String())
|
log.ErrorByKv("rpc call failed to getNewSeq", pbData.OperationID, "err", err, "pbData", pbData.String())
|
||||||
return
|
return
|
||||||
@ -52,7 +52,8 @@ func UserNewestSeq(c *gin.Context) {
|
|||||||
"msgIncr": params.MsgIncr,
|
"msgIncr": params.MsgIncr,
|
||||||
"reqIdentifier": params.ReqIdentifier,
|
"reqIdentifier": params.ReqIdentifier,
|
||||||
"data": gin.H{
|
"data": gin.H{
|
||||||
"seq": reply.Seq,
|
"maxSeq": reply.MaxSeq,
|
||||||
|
"minSeq": reply.MinSeq,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user