修改添加管理员踢群成员功能

This commit is contained in:
junleea 2024-10-07 16:23:35 +08:00
parent a1247d9ca4
commit 27a8561448
1 changed files with 2 additions and 2 deletions

View File

@ -166,13 +166,13 @@ func DelFriendOrGroup(c *gin.Context) {
} else if req.Type == 4 {
//群管理员删除群成员
if req.GroupID == 0 {
c.JSON(http.StatusOK, gin.H{"error": "parameter error", "code": proto.ParameterError, "message": "failed"})
c.JSON(http.StatusOK, gin.H{"error": "parameter error", "code": proto.ParameterError, "message": "failed,group_id is null"})
return
}
//获取群
group := dao.FindGroupByID(req.GroupID)
if len(group) == 0 {
c.JSON(http.StatusOK, gin.H{"error": "parameter error", "code": proto.ParameterError, "message": "failed"})
c.JSON(http.StatusOK, gin.H{"error": "parameter error", "code": proto.ParameterError, "message": "failed group not found"})
return
}
//判断是否是群主