Skip to content

Commit 68f4dc8

Browse files
authored
fix ns sync bug (#515)
1 parent 2344ec6 commit 68f4dc8

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/models/global.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
queryPlatform,
2222
getPluginsByNamespace,
2323
getNamespaceList,
24-
asyncByPluginAndNamespace,
24+
asyncOnePlugin,
2525
getUserPermissionByNamespace,
2626
} from "../services/api";
2727
import { getIntlContent } from "../utils/IntlUtils";
@@ -110,7 +110,7 @@ export default {
110110
},
111111
*asyncPlugin(params, { call }) {
112112
const { payload } = params;
113-
const json = yield call(asyncByPluginAndNamespace, payload);
113+
const json = yield call(asyncOnePlugin, payload);
114114
if (json.code === 200) {
115115
message.success(getIntlContent("SHENYU.COMMON.RESPONSE.SYNC.SUCCESS"));
116116
} else {

src/routes/Plugin/Common/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -894,14 +894,13 @@ export default class Common extends Component {
894894
};
895895

896896
asyncClick = () => {
897-
const { dispatch, plugins, currentNamespaceId } = this.props;
897+
const { dispatch, plugins } = this.props;
898898
let name = this.props.match.params ? this.props.match.params.id : "";
899-
const pluginId = this.getPluginId(plugins, name);
899+
const plugin = this.getPlugin(plugins, name);
900900
dispatch({
901901
type: "global/asyncPlugin",
902902
payload: {
903-
pluginId,
904-
namespaceId: currentNamespaceId,
903+
id: plugin.id,
905904
},
906905
});
907906
};

0 commit comments

Comments
 (0)