fix: load probe target with tunnel record

This commit is contained in:
sagitchu
2026-05-01 23:24:48 +08:00
parent cc0b8de2e1
commit a259dd83b2
4 changed files with 44 additions and 29 deletions
@@ -253,12 +253,14 @@ func (r *Repository) GetTunnelRecord(tunnelID int64) (*model.TunnelRecord, error
return nil, err
}
tr := model.TunnelRecord{
ID: t.ID,
Type: t.Type,
Status: t.Status,
Flow: t.Flow,
TrafficRatio: t.TrafficRatio,
Protocol: t.Protocol,
ID: t.ID,
Type: t.Type,
Status: t.Status,
Flow: t.Flow,
TrafficRatio: t.TrafficRatio,
Protocol: t.Protocol,
ProbeTargetHost: t.ProbeTargetHost,
ProbeTargetPort: t.ProbeTargetPort,
}
if tr.Flow <= 0 {
tr.Flow = 1