mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-18 17:51:24 +00:00
Test version (#4792)
* plugin node version select (#4760) * plugin node version select * type * fix * fix * perf: version list * fix node version (#4787) * change my select * fix-ui * fix test * add test * fix * remove invalid version field * filter deprecated field * fix: claude tool call * fix: test --------- Co-authored-by: heheer <heheer@sealos.io>
This commit is contained in:
@@ -57,3 +57,22 @@ export const getAppVersionById = async ({
|
||||
// If the version does not exist, the latest version is returned
|
||||
return getAppLatestVersion(appId, app);
|
||||
};
|
||||
|
||||
export const checkIsLatestVersion = async ({
|
||||
appId,
|
||||
versionId
|
||||
}: {
|
||||
appId: string;
|
||||
versionId: string;
|
||||
}) => {
|
||||
const version = await MongoAppVersion.findOne(
|
||||
{
|
||||
appId,
|
||||
isPublish: true,
|
||||
_id: { $gt: versionId }
|
||||
},
|
||||
'_id'
|
||||
).lean();
|
||||
|
||||
return !version;
|
||||
};
|
||||
|
Reference in New Issue
Block a user