|
@@ -245,7 +245,7 @@ func (s *udpForWardingService) AddUdpForwarding(ctx context.Context, req *v1.Udp
|
|
}
|
|
}
|
|
|
|
|
|
func (s *udpForWardingService) EditUdpForwarding(ctx context.Context, req *v1.UdpForwardingRequest) error {
|
|
func (s *udpForWardingService) EditUdpForwarding(ctx context.Context, req *v1.UdpForwardingRequest) error {
|
|
- WafUdpId, err := s.udpForWardingRepository.GetUdpForwardingWafUdpIdById(ctx, req.Id)
|
|
|
|
|
|
+ WafUdpId, err := s.udpForWardingRepository.GetUdpForwardingWafUdpIdById(ctx, req.UdpForwardingData.Id)
|
|
if err != nil {
|
|
if err != nil {
|
|
return err
|
|
return err
|
|
}
|
|
}
|
|
@@ -259,11 +259,11 @@ func (s *udpForWardingService) EditUdpForwarding(ctx context.Context, req *v1.Ud
|
|
return err
|
|
return err
|
|
}
|
|
}
|
|
udpModel := s.buildUdpForwardingModel(&req.UdpForwardingData, req.UdpForwardingData.WafUdpId, require)
|
|
udpModel := s.buildUdpForwardingModel(&req.UdpForwardingData, req.UdpForwardingData.WafUdpId, require)
|
|
- udpModel.Id = req.Id
|
|
|
|
|
|
+ udpModel.Id = req.UdpForwardingData.Id
|
|
if err = s.udpForWardingRepository.EditUdpForwarding(ctx, udpModel); err != nil {
|
|
if err = s.udpForWardingRepository.EditUdpForwarding(ctx, udpModel); err != nil {
|
|
return err
|
|
return err
|
|
}
|
|
}
|
|
- udpRuleModel := s.buildUdpRuleModel(&req.UdpForwardingData, require, req.Id)
|
|
|
|
|
|
+ udpRuleModel := s.buildUdpRuleModel(&req.UdpForwardingData, require, req.UdpForwardingData.Id)
|
|
if err = s.udpForWardingRepository.EditUdpForwardingIps(ctx, *udpRuleModel); err != nil {
|
|
if err = s.udpForWardingRepository.EditUdpForwardingIps(ctx, *udpRuleModel); err != nil {
|
|
return err
|
|
return err
|
|
}
|
|
}
|