|
@@ -84,9 +84,9 @@ func (r *udpForWardingRepository) GetUdpForwardingPortCountByHostId(ctx context.
|
|
return count, nil
|
|
return count, nil
|
|
}
|
|
}
|
|
|
|
|
|
-func (r *udpForWardingRepository) GetUdpForwardingWafUdpAllIds(ctx context.Context, udpId int) ([]int, error) {
|
|
|
|
|
|
+func (r *udpForWardingRepository) GetUdpForwardingWafUdpAllIds(ctx context.Context, hostId int) ([]int, error) {
|
|
var res []int
|
|
var res []int
|
|
- if err:= r.db.WithContext(ctx).Model(&model.UdpForWarding{}).Where("id = ?", udpId).Select("waf_udp_id").Find(&res).Error; err != nil {
|
|
|
|
|
|
+ if err:= r.db.WithContext(ctx).Model(&model.UdpForWarding{}).Where("host_id = ?", hostId).Select("id").Find(&res).Error; err != nil {
|
|
return nil, err
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
return res, nil
|