This is an automated email from the ASF dual-hosted git repository.
dengliming pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu-dashboard.git
The following commit(s) were added to refs/heads/master by this push:
new 20c3ea63 fix: pass namespaceId when deleting discovery config (#596)
20c3ea63 is described below
commit 20c3ea638d2c983e159d00d3b23e92e610b46355
Author: wy471x <[email protected]>
AuthorDate: Thu Sep 24 18:50:09 2026 +0800
fix: pass namespaceId when deleting discovery config (#596)
The backend now requires namespaceId on DELETE /discovery/{discoveryId}
(as @RequestParam), so send it as a query param from the frontend.
Co-authored-by: Liming Deng <[email protected]>
---
src/routes/Plugin/Discovery/index.js | 2 ++
src/services/api.js | 12 +++++++-----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/routes/Plugin/Discovery/index.js
b/src/routes/Plugin/Discovery/index.js
index 532c0a8c..bfe514dd 100644
--- a/src/routes/Plugin/Discovery/index.js
+++ b/src/routes/Plugin/Discovery/index.js
@@ -513,10 +513,12 @@ export default class DiscoveryProxy extends Component {
handleConfigDelete = (id) => {
if (id !== undefined) {
+ const { currentNamespaceId } = this.props;
this.props.dispatch({
type: "discovery/deleteConfig",
payload: {
discoveryId: id,
+ namespaceId: currentNamespaceId,
},
});
} else {
diff --git a/src/services/api.js b/src/services/api.js
index 57b02cb3..b5ad6528 100644
--- a/src/services/api.js
+++ b/src/services/api.js
@@ -1134,12 +1134,14 @@ export function refreshProxySelector(params) {
}
export function deleteDiscovery(params) {
- return request(`${baseUrl}/discovery/${params.discoveryId}`, {
- method: `DELETE`,
- body: {
- ...params,
+ return request(
+ `${baseUrl}/discovery/${params.discoveryId}?${stringify({
+ namespaceId: params.namespaceId,
+ })}`,
+ {
+ method: `DELETE`,
},
- });
+ );
}
export function getAlertReceivers(params) {