[go: nahoru, domu]

Skip to content

Commit

Permalink
fix: ensure delete api7 plugin metadata (api7#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
bzp2010 committed Apr 12, 2024
1 parent e87d512 commit 3dc2e6a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions libs/backend-api7ee/src/resourceOperator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,8 @@ export class ToAPI7ee {

// reset metadata config when metadata delete
if (resourceName === 'plugin_metadata') {
const defaultMetadata = (
await this.client.get<{ value: PluginMetadata }>(
`/apisix/admin/plugin_metadata/${resourceId}/default`,
)
).data.value;
resp = await this.client.put(
resp = await this.client.delete(
`/apisix/admin/plugin_metadata/${resourceId}?gateway_group_id=${this.gatewayGroupId}`,
defaultMetadata,
);
} else {
resp = await this.client.delete(
Expand Down

0 comments on commit 3dc2e6a

Please sign in to comment.