mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-21 03:10:50 +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:
@@ -22,7 +22,8 @@ export const chatConfigType = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// schema
|
// schema
|
||||||
const AppSchema = new Schema({
|
const AppSchema = new Schema(
|
||||||
|
{
|
||||||
parentId: {
|
parentId: {
|
||||||
type: Schema.Types.ObjectId,
|
type: Schema.Types.ObjectId,
|
||||||
ref: AppCollectionName,
|
ref: AppCollectionName,
|
||||||
@@ -117,7 +118,11 @@ const AppSchema = new Schema({
|
|||||||
|
|
||||||
// abandoned
|
// abandoned
|
||||||
defaultPermission: Number
|
defaultPermission: Number
|
||||||
});
|
},
|
||||||
|
{
|
||||||
|
minimize: false
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
AppSchema.index({ type: 1 });
|
AppSchema.index({ type: 1 });
|
||||||
AppSchema.index({ teamId: 1, updateTime: -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';
|
export const AppVersionCollectionName = 'app_versions';
|
||||||
|
|
||||||
const AppVersionSchema = new Schema({
|
const AppVersionSchema = new Schema(
|
||||||
|
{
|
||||||
tmbId: {
|
tmbId: {
|
||||||
type: String,
|
type: String,
|
||||||
ref: TeamMemberCollectionName,
|
ref: TeamMemberCollectionName,
|
||||||
@@ -34,7 +35,11 @@ const AppVersionSchema = new Schema({
|
|||||||
},
|
},
|
||||||
isPublish: Boolean,
|
isPublish: Boolean,
|
||||||
versionName: String
|
versionName: String
|
||||||
});
|
},
|
||||||
|
{
|
||||||
|
minimize: false
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
AppVersionSchema.index({ appId: 1, time: -1 });
|
AppVersionSchema.index({ appId: 1, time: -1 });
|
||||||
|
Reference in New Issue
Block a user