Commit 25c00cde by Theresa Committed by GitHub

Mcp db fix (#5096)

* fix: correct input schema property name in getTools method

* fix: refactor schema definitions for AppSchema and AppVersionSchema
parent 62605583
......@@ -22,7 +22,8 @@ export const chatConfigType = {
};
// schema
const AppSchema = new Schema({
const AppSchema = new Schema(
{
parentId: {
type: Schema.Types.ObjectId,
ref: AppCollectionName,
......@@ -117,7 +118,11 @@ const AppSchema = new Schema({
// abandoned
defaultPermission: Number
});
},
{
minimize: false
}
);
AppSchema.index({ type: 1 });
AppSchema.index({ teamId: 1, updateTime: -1 });
......
......@@ -6,7 +6,8 @@ import { TeamMemberCollectionName } from '@fastgpt/global/support/user/team/cons
export const AppVersionCollectionName = 'app_versions';
const AppVersionSchema = new Schema({
const AppVersionSchema = new Schema(
{
tmbId: {
type: String,
ref: TeamMemberCollectionName,
......@@ -34,7 +35,11 @@ const AppVersionSchema = new Schema({
},
isPublish: Boolean,
versionName: String
});
},
{
minimize: false
}
);
try {
AppVersionSchema.index({ appId: 1, time: -1 });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment