Skip to content

fix: pass namespaceId when deleting discovery config - #596

Open
wy471x wants to merge 1 commit into
apache:masterfrom
wy471x:fix_discovery-update-updateSelective-delete-WHERE-id-only
Open

fix: pass namespaceId when deleting discovery config#596
wy471x wants to merge 1 commit into
apache:masterfrom
wy471x:fix_discovery-update-updateSelective-delete-WHERE-id-only

Conversation

@wy471x

@wy471x wy471x commented Aug 30, 2026

Copy link
Copy Markdown

The backend now requires namespaceId on DELETE /discovery/{discoveryId} (implemented as @RequestParam). Without it, deleting a discovery config from the UI returns 400.

  • handleConfigDelete in the Discovery page now passes namespaceId: currentNamespaceId in the dispatch payload.
  • deleteDiscovery sends namespaceId as a query param instead of a body.

insertOrUpdate already passes namespaceId, so it is unaffected.

related pr: #7007

The backend now requires namespaceId on DELETE /discovery/{discoveryId}
(as @RequestParam), so send it as a query param from the frontend.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the dashboard’s Discovery deletion flow to satisfy a backend contract change requiring namespaceId on DELETE /discovery/{discoveryId} (as a query @RequestParam), preventing 400 responses when deleting discovery configs from the UI.

Changes:

  • Passes namespaceId: currentNamespaceId when dispatching the discovery/deleteConfig action from the Discovery page.
  • Updates deleteDiscovery to send namespaceId as a query parameter (instead of in a request body) on the DELETE call.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/services/api.js Sends namespaceId via query string for DELETE /discovery/{id} to match backend requirements.
src/routes/Plugin/Discovery/index.js Includes currentNamespaceId in the delete-config dispatch payload so the API layer can include it.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants