Skip to content

Commit

Permalink
fix orphan aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
y-du committed Feb 7, 2024
1 parent ab560b2 commit afc5205
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions handler/nginx_hdl/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ func (h *Handler) RemoveAll(ctx context.Context, filter lib_model.EndpointFilter
return lib_model.NewNotAllowedError(fmt.Errorf("remove endpoint '%s' not allowed", id))
}
delete(endpointsCopy, id)
aliases := h.getAliases(id)
for _, id2 := range aliases {
delete(endpointsCopy, id2)
}
}
return h.update(ctx, endpointsCopy)
}
Expand Down

0 comments on commit afc5205

Please sign in to comment.