diff --git a/src/models/global.js b/src/models/global.js index 03d853b58..a43742a13 100644 --- a/src/models/global.js +++ b/src/models/global.js @@ -21,7 +21,7 @@ import { queryPlatform, getAllPlugins, getNamespaceList, - asyncOnePlugin, + asyncByPluginAndNamespace, getUserPermissionByToken, } from "../services/api"; import { getIntlContent } from "../utils/IntlUtils"; @@ -83,7 +83,7 @@ export default { }, *asyncPlugin(params, { call }) { const { payload } = params; - const json = yield call(asyncOnePlugin, payload); + const json = yield call(asyncByPluginAndNamespace, payload); if (json.code === 200) { message.success(getIntlContent("SHENYU.COMMON.RESPONSE.SYNC.SUCCESS")); } else { diff --git a/src/services/api.js b/src/services/api.js index 8a3142c55..9a82524b7 100644 --- a/src/services/api.js +++ b/src/services/api.js @@ -556,13 +556,23 @@ export async function asyncConfigImport(params) { }); } -// 同步单个插件 +// sync on plugin export async function asyncOnePlugin(params) { return request(`${baseUrl}/namespacePlugin/syncPluginData?id=${params.id}`, { method: `PUT`, }); } +// sync by plugin and namespace +export async function asyncByPluginAndNamespace(params) { + return request( + `${baseUrl}/namespacePlugin/syncPluginData?id=${params.id}&namespaceId=${params.namespaceId}`, + { + method: `PUT`, + }, + ); +} + // get plugin dropdown list export async function getPluginDropDownList() { return request(`${baseUrl}/plugin/all`, {