mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-25 06:14:06 +00:00
4.6.4 (#588)
This commit is contained in:
@@ -19,14 +19,15 @@ const systemConfigSchema = new Schema({
|
||||
type: Date,
|
||||
default: () => new Date()
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
try {
|
||||
systemConfigSchema.index({ createTime: -1 }, { expireAfterSeconds: 90 * 24 * 60 * 60 });
|
||||
systemConfigSchema.index({ type: 1 });
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
export const MongoSystemConfigs: Model<SystemConfigsType>=
|
||||
export const MongoSystemConfigs: Model<SystemConfigsType> =
|
||||
models[collectionName] || model(collectionName, systemConfigSchema);
|
||||
MongoSystemConfigs.syncIndexes();
|
||||
MongoSystemConfigs.syncIndexes();
|
||||
|
Reference in New Issue
Block a user