* feat: log store

* fix: full text search match query

* perf: mongo schema import, Avoid duplicate import
This commit is contained in:
Archer
2024-07-05 17:37:42 +08:00
committed by GitHub
parent 88d10451c9
commit 5605f1a892
39 changed files with 252 additions and 201 deletions

View File

@@ -1,5 +1,5 @@
import { TeamCollectionName } from '@fastgpt/global/support/user/team/constant';
import { connectionMongo, type Model } from '../../mongo';
import { connectionMongo, getMongoModel, type Model } from '../../mongo';
import { MongoImageSchemaType } from '@fastgpt/global/common/file/image/type.d';
import { mongoImageTypeMap } from '@fastgpt/global/common/file/image/constants';
const { Schema, model, models } = connectionMongo;
@@ -41,7 +41,4 @@ try {
console.log(error);
}
export const MongoImage: Model<MongoImageSchemaType> =
models['image'] || model('image', ImageSchema);
MongoImage.syncIndexes();
export const MongoImage = getMongoModel<MongoImageSchemaType>('image', ImageSchema);