Commercial baseurl (#697)

This commit is contained in:
Archer
2024-01-06 10:36:31 +08:00
committed by GitHub
parent dfa4c0831c
commit 84cc4baf21
44 changed files with 124 additions and 119 deletions

View File

@@ -1,8 +1,11 @@
import { SystemConfigsTypeEnum } from '@fastgpt/global/common/system/config/constants';
import { MongoSystemConfigs } from './schema';
import { FastGPTConfigFileType } from '@fastgpt/global/common/system/types';
import { FastGPTProUrl } from '../constants';
export const getFastGPTConfigFromDB = async () => {
if (!FastGPTProUrl) return {} as FastGPTConfigFileType;
const res = await MongoSystemConfigs.findOne({
type: SystemConfigsTypeEnum.fastgpt
}).sort({
@@ -11,5 +14,5 @@ export const getFastGPTConfigFromDB = async () => {
const config = res?.value || {};
return config as Omit<FastGPTConfigFileType, 'systemEnv'>;
return config as FastGPTConfigFileType;
};