修复了一些问题

This commit is contained in:
李琦
2026-07-08 08:18:58 +08:00
parent bb7891706b
commit 3417856607
19 changed files with 615 additions and 778 deletions

View File

@@ -310,6 +310,7 @@ func UpdateContactHandler(c *gin.Context) {
GroupID uint `json:"group_id"`
IsTop *bool `json:"is_top"`
IsMuted *bool `json:"is_muted"`
IsBlocked *bool `json:"is_blocked"`
}
if err := c.ShouldBindJSON(&req); err != nil {
@@ -330,6 +331,9 @@ func UpdateContactHandler(c *gin.Context) {
if req.IsMuted != nil {
updates["is_muted"] = *req.IsMuted
}
if req.IsBlocked != nil {
updates["is_blocked"] = *req.IsBlocked
}
if err := service.ContactSvc.UpdateContact(userID.(string), contactID, updates); err != nil {
utils.BadRequest(c, "更新失败: "+err.Error())