mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-18 17:51:24 +00:00
Mcp db fix (#5096)
* fix: correct input schema property name in getTools method * fix: refactor schema definitions for AppSchema and AppVersionSchema
This commit is contained in:
@@ -6,35 +6,40 @@ import { TeamMemberCollectionName } from '@fastgpt/global/support/user/team/cons
|
||||
|
||||
export const AppVersionCollectionName = 'app_versions';
|
||||
|
||||
const AppVersionSchema = new Schema({
|
||||
tmbId: {
|
||||
type: String,
|
||||
ref: TeamMemberCollectionName,
|
||||
required: true
|
||||
const AppVersionSchema = new Schema(
|
||||
{
|
||||
tmbId: {
|
||||
type: String,
|
||||
ref: TeamMemberCollectionName,
|
||||
required: true
|
||||
},
|
||||
appId: {
|
||||
type: Schema.Types.ObjectId,
|
||||
ref: AppVersionCollectionName,
|
||||
required: true
|
||||
},
|
||||
time: {
|
||||
type: Date,
|
||||
default: () => new Date()
|
||||
},
|
||||
nodes: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
edges: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
chatConfig: {
|
||||
type: chatConfigType
|
||||
},
|
||||
isPublish: Boolean,
|
||||
versionName: String
|
||||
},
|
||||
appId: {
|
||||
type: Schema.Types.ObjectId,
|
||||
ref: AppVersionCollectionName,
|
||||
required: true
|
||||
},
|
||||
time: {
|
||||
type: Date,
|
||||
default: () => new Date()
|
||||
},
|
||||
nodes: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
edges: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
chatConfig: {
|
||||
type: chatConfigType
|
||||
},
|
||||
isPublish: Boolean,
|
||||
versionName: String
|
||||
});
|
||||
{
|
||||
minimize: false
|
||||
}
|
||||
);
|
||||
|
||||
try {
|
||||
AppVersionSchema.index({ appId: 1, time: -1 });
|
||||
|
Reference in New Issue
Block a user