mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-24 18:36:19 +08:00
add null value handle
This commit is contained in:
parent
32fe763c0c
commit
7301bc30b1
@ -84,18 +84,18 @@ func main() {
|
|||||||
//Manager
|
//Manager
|
||||||
managementGroup := r.Group("/manager")
|
managementGroup := r.Group("/manager")
|
||||||
{
|
{
|
||||||
managementGroup.POST("/delete_user", manage.DeleteUser)
|
managementGroup.POST("/delete_user", manage.DeleteUser) //1
|
||||||
managementGroup.POST("/send_msg", manage.ManagementSendMsg)
|
managementGroup.POST("/send_msg", manage.ManagementSendMsg)
|
||||||
managementGroup.POST("/get_all_users_uid", manage.GetAllUsersUid)
|
managementGroup.POST("/get_all_users_uid", manage.GetAllUsersUid) //1
|
||||||
managementGroup.POST("/account_check", manage.AccountCheck)
|
managementGroup.POST("/account_check", manage.AccountCheck) //1
|
||||||
managementGroup.POST("/get_users_online_status", manage.GetUsersOnlineStatus)
|
managementGroup.POST("/get_users_online_status", manage.GetUsersOnlineStatus) //1
|
||||||
}
|
}
|
||||||
//Conversation
|
//Conversation
|
||||||
conversationGroup := r.Group("/conversation")
|
conversationGroup := r.Group("/conversation")
|
||||||
{
|
{
|
||||||
conversationGroup.POST("/set_receive_message_opt", conversation.SetReceiveMessageOpt)
|
conversationGroup.POST("/set_receive_message_opt", conversation.SetReceiveMessageOpt) //1
|
||||||
conversationGroup.POST("/get_receive_message_opt", conversation.GetReceiveMessageOpt)
|
conversationGroup.POST("/get_receive_message_opt", conversation.GetReceiveMessageOpt) //1
|
||||||
conversationGroup.POST("/get_all_conversation_message_opt", conversation.GetAllConversationMessageOpt)
|
conversationGroup.POST("/get_all_conversation_message_opt", conversation.GetAllConversationMessageOpt) //1
|
||||||
}
|
}
|
||||||
|
|
||||||
log.NewPrivateLog("api")
|
log.NewPrivateLog("api")
|
||||||
|
@ -181,6 +181,9 @@ func GetJoinedGroupList(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
GroupListResp := api.GetJoinedGroupListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Data: RpcResp.GroupList}
|
GroupListResp := api.GetJoinedGroupListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Data: RpcResp.GroupList}
|
||||||
|
if len(RpcResp.GroupList) == 0 {
|
||||||
|
GroupListResp.Data = []*open_im_sdk.GroupInfo{}
|
||||||
|
}
|
||||||
c.JSON(http.StatusOK, GroupListResp)
|
c.JSON(http.StatusOK, GroupListResp)
|
||||||
log.NewInfo(req.OperationID, "GetJoinedGroupList api return ", GroupListResp)
|
log.NewInfo(req.OperationID, "GetJoinedGroupList api return ", GroupListResp)
|
||||||
}
|
}
|
||||||
@ -482,7 +485,6 @@ func TransferGroupOwner(c *gin.Context) {
|
|||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
resp := api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg}
|
resp := api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg}
|
||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
log.NewInfo(req.OperationID, "TransferGroupOwner api return ", resp)
|
log.NewInfo(req.OperationID, "TransferGroupOwner api return ", resp)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user