Skip to content

Commit

Permalink
update error handle
Browse files Browse the repository at this point in the history
  • Loading branch information
sagostin committed Mar 6, 2024
1 parent 65f0cab commit c9615b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/agent/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ func (c *Probe) GetAllProbesForAgent(db *mongo.Database) ([]*Probe, error) {
var port = strings.Split(probe.Config.Target[0].Target, ":")[1]
tC.Config.Target[0].Target = netResult.PublicAddress + ":" + port
break

}
}
} else {
Expand Down
5 changes: 4 additions & 1 deletion web/agents.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ func addRouteAgents(r *Router) []*Route {
s := agent.Agent{ID: sId}

cAgent := new(agent.Agent)
ctx.ReadJSON(&cAgent)
err = ctx.ReadJSON(&cAgent)
if err != nil {
return err
}

cAgent.Site = s.ID

Expand Down

0 comments on commit c9615b7

Please sign in to comment.