4.6.4 (#588)
This commit is contained in:
15
packages/service/common/system/config/controller.ts
Normal file
15
packages/service/common/system/config/controller.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { SystemConfigsTypeEnum } from '@fastgpt/global/common/system/config/constants';
|
||||
import { MongoSystemConfigs } from './schema';
|
||||
import { FeConfigsType } from '@fastgpt/global/common/system/types';
|
||||
|
||||
export const getFastGPTFeConfig = async () => {
|
||||
const res = await MongoSystemConfigs.findOne({
|
||||
type: SystemConfigsTypeEnum.fastgpt
|
||||
}).sort({
|
||||
createTime: -1
|
||||
});
|
||||
|
||||
const config: FeConfigsType = res?.value?.FeConfig || {};
|
||||
|
||||
return config;
|
||||
};
|
||||
Reference in New Issue
Block a user