mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-04 09:05:59 +08:00
fix bug
This commit is contained in:
@@ -32,8 +32,8 @@ func GetMessagesStatistics(c *gin.Context) {
|
||||
client := pb.NewUserClient(etcdConn)
|
||||
respPb, err := client.GetMessageStatistics(context.Background(), &reqPb)
|
||||
if err != nil {
|
||||
log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "GetMessageStatistics failed", err.Error())
|
||||
openIMHttp.RespHttp200(c, err, resp)
|
||||
log.NewError("0", utils.GetSelfFuncName(), err.Error())
|
||||
return
|
||||
}
|
||||
// utils.CopyStructFields(&resp, respPb)
|
||||
@@ -77,7 +77,7 @@ func GetUserStatistics(c *gin.Context) {
|
||||
client := pb.NewUserClient(etcdConn)
|
||||
respPb, err := client.GetUserStatistics(context.Background(), &reqPb)
|
||||
if err != nil {
|
||||
log.NewError("0", utils.GetSelfFuncName(), err.Error())
|
||||
log.NewError("0", utils.GetSelfFuncName(), "GetUserStatistics failed", err.Error())
|
||||
openIMHttp.RespHttp200(c, err, nil)
|
||||
return
|
||||
}
|
||||
@@ -132,6 +132,7 @@ func GetGroupStatistics(c *gin.Context) {
|
||||
client := pb.NewUserClient(etcdConn)
|
||||
respPb, err := client.GetGroupStatistics(context.Background(), &reqPb)
|
||||
if err != nil {
|
||||
log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "GetGroupStatistics failed", err.Error())
|
||||
openIMHttp.RespHttp200(c, err, nil)
|
||||
return
|
||||
}
|
||||
@@ -179,6 +180,7 @@ func GetActiveUser(c *gin.Context) {
|
||||
client := pb.NewUserClient(etcdConn)
|
||||
respPb, err := client.GetActiveUser(context.Background(), &reqPb)
|
||||
if err != nil {
|
||||
log.NewError(reqPb.OperationID, utils.GetSelfFuncName(), "GetActiveUser failed ", err.Error())
|
||||
openIMHttp.RespHttp200(c, err, nil)
|
||||
return
|
||||
}
|
||||
@@ -194,7 +196,7 @@ func GetActiveGroup(c *gin.Context) {
|
||||
)
|
||||
reqPb.StatisticsReq = &pb.StatisticsReq{}
|
||||
if err := c.ShouldBindQuery(&req); err != nil {
|
||||
log.NewError("0", "BindJSON failed ", err.Error())
|
||||
log.NewError("0", utils.GetSelfFuncName(), "BindJSON failed ", err.Error())
|
||||
openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
|
||||
return
|
||||
}
|
||||
@@ -203,7 +205,7 @@ func GetActiveGroup(c *gin.Context) {
|
||||
client := pb.NewUserClient(etcdConn)
|
||||
respPb, err := client.GetActiveGroup(context.Background(), &reqPb)
|
||||
if err != nil {
|
||||
log.NewError("0", "BindJSON failed ", err.Error())
|
||||
log.NewError("0", utils.GetSelfFuncName(), "GetActiveGroup failed ", err.Error())
|
||||
openIMHttp.RespHttp200(c, err, nil)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user