diff --git a/core/core-frontend/src/api/sync/syncDatasource.ts b/core/core-frontend/src/api/sync/syncDatasource.ts index 5a9686c8fd..6de7e8eebb 100644 --- a/core/core-frontend/src/api/sync/syncDatasource.ts +++ b/core/core-frontend/src/api/sync/syncDatasource.ts @@ -7,8 +7,8 @@ export const sourceDsPageApi = (page: number, limit: number, data) => { export const targetDsPageApi = (page: number, limit: number, data) => { return request.post({ url: `/sync/datasource/target/pager/${page}/${limit}`, data }) } -export const latestUseApi = () => { - return request.post({ url: '/sync/datasource/latestUse', data: {} }) +export const latestUseApi = (sourceType: string) => { + return request.post({ url: `/sync/datasource/latestUse/${sourceType}`, data: {} }) } export const validateApi = data => { diff --git a/sdk/api/api-sync/src/main/java/io/dataease/api/sync/datasource/api/SyncDatasourceApi.java b/sdk/api/api-sync/src/main/java/io/dataease/api/sync/datasource/api/SyncDatasourceApi.java index 4e5d7c6cd5..4b10ea7f75 100644 --- a/sdk/api/api-sync/src/main/java/io/dataease/api/sync/datasource/api/SyncDatasourceApi.java +++ b/sdk/api/api-sync/src/main/java/io/dataease/api/sync/datasource/api/SyncDatasourceApi.java @@ -56,8 +56,8 @@ public interface SyncDatasourceApi { @GetMapping("/validate/{datasourceId}") SyncDatasourceDTO validate(@PathVariable("datasourceId") String datasourceId) throws DEException; - @PostMapping("/latestUse") - List latestUse(); + @PostMapping("/latestUse/{sourceType}") + List latestUse(@PathVariable("sourceType") String sourceType); @GetMapping("/get/{datasourceId}") SyncDatasourceDTO get(@PathVariable("datasourceId") String datasourceId) throws DEException;