Skip to content

Commit

Permalink
fix: default vCluster set to null for delete interceptors (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
marnas authored Dec 3, 2024
1 parent 27c0230 commit 1c3244b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions client/gateway_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,10 @@ func (client *GatewayClient) DeleteResourceInterceptors(resource *resource.Resou
kinds := client.GetKinds()
kind, ok := kinds[resource.Kind]
scope := resource.Metadata["scope"]
passthrough := "passthrough"
var deleteInterceptorPayload DeleteInterceptorPayload
if scope == nil {
deleteInterceptorPayload = DeleteInterceptorPayload{
VCluster: &passthrough,
VCluster: nil,
Group: nil,
Username: nil,
}
Expand All @@ -190,8 +189,6 @@ func (client *GatewayClient) DeleteResourceInterceptors(resource *resource.Resou
if vCluster != nil && vCluster.(string) != "" {
vClusterValue = vCluster.(string)
deleteInterceptorPayload.VCluster = &vClusterValue
} else {
deleteInterceptorPayload.VCluster = &passthrough
}
group := scope.(map[string]interface{})["group"]
var groupValue string
Expand Down

0 comments on commit 1c3244b

Please sign in to comment.