mirror of
https://github.com/openziti/zrok.git
synced 2025-08-13 17:57:37 +02:00
bugs, lint, testing (#967)
This commit is contained in:
@ -144,7 +144,12 @@ func (h *disableHandler) removeAgentRemoteForEnvironment(env *store.Environment,
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
aeZId := *(listResp.Payload.Data[0].ID)
|
||||
aeZId := ""
|
||||
if len(listResp.Payload.Data) > 0 {
|
||||
aeZId = *(listResp.Payload.Data[0].ID)
|
||||
} else {
|
||||
return errors.New("no agent remoting identity found")
|
||||
}
|
||||
if err := zrokEdgeSdk.DeleteService(env.ZId, aeZId, edge); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user