X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fplugins%2Fplugin-index.ts;h=7bcb6ed4c9a291c278b4555ed85be66d6971e16a;hb=5fb2e2888ce032c638e4b75d07458642f0833e52;hp=dcdfba28c53092a077d10a59a575c73f27eca5ae;hpb=a15871560f80e07386c1dabb8370cd2664ecfd1f;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/plugins/plugin-index.ts b/server/lib/plugins/plugin-index.ts index dcdfba28c..7bcb6ed4c 100644 --- a/server/lib/plugins/plugin-index.ts +++ b/server/lib/plugins/plugin-index.ts @@ -11,6 +11,7 @@ import { PluginModel } from '../../models/server/plugin' import { PluginManager } from './plugin-manager' import { logger } from '../../helpers/logger' import { PEERTUBE_VERSION } from '../../initializers/constants' +import { sanitizeUrl } from '@server/helpers/core-utils' async function listAvailablePluginsFromIndex (options: PeertubePluginIndexList) { const { start = 0, count = 20, search, sort = 'npmName', pluginType } = options @@ -27,7 +28,7 @@ async function listAvailablePluginsFromIndex (options: PeertubePluginIndexList) const uri = CONFIG.PLUGINS.INDEX.URL + '/api/v1/plugins' try { - const { body } = await doRequest({ uri, qs, json: true }) + const { body } = await doRequest({ uri, qs, json: true }) logger.debug('Got result from PeerTube index.', { body }) @@ -55,9 +56,9 @@ async function getLatestPluginsVersion (npmNames: string[]): Promise({ uri, body: bodyRequest, json: true, method: 'POST' }) return body }