فهرست منبع

fix(internal/repository): 修复删除 UDP 转发规则时的字段错误

- 将删除条件从 "host_id" 修改为 "udp
fusu 1 ماه پیش
والد
کامیت
aae5d97e43
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      internal/repository/udpforwarding.go

+ 1 - 1
internal/repository/udpforwarding.go

@@ -166,7 +166,7 @@ func (r *udpForWardingRepository) DeleteUdpForwardingIpsById(ctx context.Context
 
 	collection := r.mongoDB.Collection("udp_forwarding_rules")
 
-	 err := collection.Remove(ctx, bson.M{"host_id": udpId})
+	 err := collection.Remove(ctx, bson.M{"udp_id": udpId})
 
 	if err != nil {
 		if errors.Is(err, mongo.ErrNoDocuments) {