filter tool type version & fix unpublished version (#4803)

This commit is contained in:
heheer
2025-05-13 17:58:51 +08:00
committed by GitHub
parent 398d131bac
commit 3688842cc7
4 changed files with 57 additions and 54 deletions

View File

@@ -15,6 +15,7 @@ export const getAppLatestVersion = async (appId: string, app?: AppSchema) => {
if (version) {
return {
versionId: version._id,
versionName: version.versionName,
nodes: version.nodes,
edges: version.edges,
chatConfig: version.chatConfig || app?.chatConfig || {}
@@ -22,6 +23,7 @@ export const getAppLatestVersion = async (appId: string, app?: AppSchema) => {
}
return {
versionId: app?.pluginData?.nodeVersion,
versionName: app?.name,
nodes: app?.modules || [],
edges: app?.edges || [],
chatConfig: app?.chatConfig || {}
@@ -47,6 +49,7 @@ export const getAppVersionById = async ({
if (version) {
return {
versionId: version._id,
versionName: version.versionName,
nodes: version.nodes,
edges: version.edges,
chatConfig: version.chatConfig || app?.chatConfig || {}