mirror of
https://github.com/CodePhiliaX/Chat2DB.git
synced 2026-03-13 09:02:05 +08:00
fix:Alternate environment interface
This commit is contained in:
@@ -64,7 +64,7 @@ export default forwardRef(function CreateConnection(props: IProps, ref: Forwarde
|
||||
connectionService.getEnvList().then((res) => {
|
||||
setEnvList(res?.map(t => {
|
||||
return {
|
||||
value: t.code,
|
||||
value: t.id,
|
||||
label: t.name
|
||||
}
|
||||
}));
|
||||
|
||||
@@ -76,7 +76,14 @@ const downloadDriver = createRequest<{ dbType: string }, void>('/api/jdbc/driver
|
||||
|
||||
const saveDriver = createRequest<IUploadDriver, void>('/api/jdbc/driver/save', { errorLevel: false, method: 'post' });
|
||||
|
||||
const getEnvList = createRequest<void, {code:string, name:string}[]>('/api/env/list', { errorLevel: false});
|
||||
export interface IEnv {
|
||||
id: string;
|
||||
name: string;
|
||||
shortName: string;
|
||||
style: string;
|
||||
}
|
||||
|
||||
const getEnvList = createRequest<void, IEnv[]>('/api/common/environment/list_all', { errorLevel: false});
|
||||
|
||||
export default {
|
||||
getEnvList,
|
||||
|
||||
Reference in New Issue
Block a user