From 17fd701e3e7709687e8d79942e52da7432272575 Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Thu, 25 Jan 2024 22:17:40 +0800 Subject: [PATCH] refactor: refactor dataSource manager --- .../plugin-data-source-manager/src/client/hooks/index.ts | 2 +- .../@nocobase/plugin-data-source-manager/src/client/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/hooks/index.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/hooks/index.ts index ff53ca48ad..4daa91ca4f 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/hooks/index.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/hooks/index.ts @@ -46,7 +46,7 @@ export const useTestConnectionAction = () => { await form.submit(); try { actionField.data.loading = true; - await api.resource('databaseConnections').testConnection({ + await api.resource('dataSource').testConnection({ values: { ...form.values, }, diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/index.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/index.tsx index 9fea79b714..8e74075e3d 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/index.tsx @@ -49,7 +49,7 @@ export class PluginDataSourceManagerClient extends Plugin { const service = await this.app.apiClient.request<{ data: any; }>({ - resource: 'databaseConnections', + resource: 'dataSources', action: 'list', params: { paginate: false,