Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix namespace sync bug #495

Merged
merged 4 commits into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/models/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
queryPlatform,
getAllPlugins,
getNamespaceList,
asyncOnePlugin,
asyncByPluginAndNamespace,
getUserPermissionByToken,
} from "../services/api";
import { getIntlContent } from "../utils/IntlUtils";
Expand Down Expand Up @@ -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 {
Expand Down
12 changes: 11 additions & 1 deletion src/services/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`, {
Expand Down
Loading