mirror of
https://github.com/CodePhiliaX/Chat2DB.git
synced 2026-03-13 09:02:05 +08:00
fix: bug
This commit is contained in:
@@ -105,6 +105,9 @@ const SelectBoundInfo = memo((props: IProps) => {
|
||||
|
||||
// 获取数据库列表
|
||||
const getDatabaseList = () => {
|
||||
if(boundInfo.dataSourceId === undefined || boundInfo.dataSourceId === null){
|
||||
return
|
||||
}
|
||||
connectionService
|
||||
.getDatabaseList({
|
||||
dataSourceId: boundInfo.dataSourceId,
|
||||
@@ -131,8 +134,8 @@ const SelectBoundInfo = memo((props: IProps) => {
|
||||
|
||||
// 获取schema列表
|
||||
const getSchemaList = () => {
|
||||
if (boundInfo.databaseName === null || boundInfo.databaseName === undefined) {
|
||||
return;
|
||||
if(boundInfo.dataSourceId === undefined || boundInfo.dataSourceId === null){
|
||||
return
|
||||
}
|
||||
connectionService
|
||||
.getSchemaList({
|
||||
|
||||
@@ -59,7 +59,7 @@ const getDatabaseList = createRequest<{ dataSourceId: number; refresh?: boolean
|
||||
method: 'get',
|
||||
});
|
||||
|
||||
const getSchemaList = createRequest<{ dataSourceId: number; databaseName: string; refresh?: boolean }, any>(
|
||||
const getSchemaList = createRequest<{ dataSourceId: number; databaseName?: string; refresh?: boolean }, any>(
|
||||
'/api/rdb/schema/list',
|
||||
{ method: 'get' },
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user