fix: pass namespaceId when deleting discovery config - #596
Open
wy471x wants to merge 1 commit into
Open
Conversation
The backend now requires namespaceId on DELETE /discovery/{discoveryId}
(as @RequestParam), so send it as a query param from the frontend.
3 tasks
There was a problem hiding this comment.
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: currentNamespaceIdwhen dispatching thediscovery/deleteConfigaction from the Discovery page. - Updates
deleteDiscoveryto sendnamespaceIdas 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The backend now requires
namespaceIdonDELETE /discovery/{discoveryId}(implemented as@RequestParam). Without it, deleting a discovery config from the UI returns 400.handleConfigDeletein the Discovery page now passesnamespaceId: currentNamespaceIdin the dispatch payload.deleteDiscoverysendsnamespaceIdas a query param instead of a body.insertOrUpdatealready passesnamespaceId, so it is unaffected.related pr: #7007