diff --git a/web/app/components/plugins/marketplace/utils.ts b/web/app/components/plugins/marketplace/utils.ts index df20c4517d..437bb2074e 100644 --- a/web/app/components/plugins/marketplace/utils.ts +++ b/web/app/components/plugins/marketplace/utils.ts @@ -18,7 +18,10 @@ export const getMarketplaceCollectionsAndPlugins = async (query?: CollectionsAnd const marketplaceCollectionsDataJson = await marketplaceCollectionsData.json() marketplaceCollections = marketplaceCollectionsDataJson.data.collections await Promise.all(marketplaceCollections.map(async (collection: MarketplaceCollection) => { - const marketplaceCollectionPluginsData = await globalThis.fetch(`${MARKETPLACE_API_PREFIX}/collections/${collection.name}/plugins?category=${query?.category}`) + let url = `${MARKETPLACE_API_PREFIX}/collections/${collection.name}/plugins` + if (query?.category) + url += `?category=${query.category}` + const marketplaceCollectionPluginsData = await globalThis.fetch(url) const marketplaceCollectionPluginsDataJson = await marketplaceCollectionPluginsData.json() const plugins = marketplaceCollectionPluginsDataJson.data.plugins.map((plugin: Plugin) => { return { diff --git a/web/app/components/plugins/types.ts b/web/app/components/plugins/types.ts index 948d0b0fb2..e29dc62484 100644 --- a/web/app/components/plugins/types.ts +++ b/web/app/components/plugins/types.ts @@ -3,7 +3,7 @@ import type { ToolCredential } from '@/app/components/tools/types' import type { Locale } from '@/i18n' export enum PluginType { - tool = 'tool', + tool = 'tools', model = 'model', extension = 'extension', }