mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
fix: marketplace
This commit is contained in:
parent
fd0a830816
commit
02854b273f
|
@ -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 {
|
||||
|
|
|
@ -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',
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user