aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/plugins/plugin-index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/plugins/plugin-index.ts')
-rw-r--r--server/lib/plugins/plugin-index.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/server/lib/plugins/plugin-index.ts b/server/lib/plugins/plugin-index.ts
index 63cd47e63..6b7810618 100644
--- a/server/lib/plugins/plugin-index.ts
+++ b/server/lib/plugins/plugin-index.ts
@@ -10,8 +10,7 @@ import { PeerTubePluginIndex } from '../../../shared/models/plugins/peertube-plu
10import { PluginModel } from '../../models/server/plugin' 10import { PluginModel } from '../../models/server/plugin'
11import { PluginManager } from './plugin-manager' 11import { PluginManager } from './plugin-manager'
12import { logger } from '../../helpers/logger' 12import { logger } from '../../helpers/logger'
13 13import { PEERTUBE_VERSION } from '../../initializers/constants'
14const packageJSON = require('../../../../package.json')
15 14
16async function listAvailablePluginsFromIndex (options: PeertubePluginIndexList) { 15async function listAvailablePluginsFromIndex (options: PeertubePluginIndexList) {
17 const { start = 0, count = 20, search, sort = 'npmName', pluginType } = options 16 const { start = 0, count = 20, search, sort = 'npmName', pluginType } = options
@@ -22,7 +21,7 @@ async function listAvailablePluginsFromIndex (options: PeertubePluginIndexList)
22 sort, 21 sort,
23 pluginType, 22 pluginType,
24 search, 23 search,
25 currentPeerTubeEngine: packageJSON.version 24 currentPeerTubeEngine: PEERTUBE_VERSION
26 } 25 }
27 26
28 const uri = CONFIG.PLUGINS.INDEX.URL + '/api/v1/plugins' 27 const uri = CONFIG.PLUGINS.INDEX.URL + '/api/v1/plugins'
@@ -53,7 +52,7 @@ async function addInstanceInformation (result: ResultList<PeerTubePluginIndex>)
53async function getLatestPluginsVersion (npmNames: string[]): Promise<PeertubePluginLatestVersionResponse> { 52async function getLatestPluginsVersion (npmNames: string[]): Promise<PeertubePluginLatestVersionResponse> {
54 const bodyRequest: PeertubePluginLatestVersionRequest = { 53 const bodyRequest: PeertubePluginLatestVersionRequest = {
55 npmNames, 54 npmNames,
56 currentPeerTubeEngine: packageJSON.version 55 currentPeerTubeEngine: PEERTUBE_VERSION
57 } 56 }
58 57
59 const uri = CONFIG.PLUGINS.INDEX.URL + '/api/v1/plugins/latest-version' 58 const uri = CONFIG.PLUGINS.INDEX.URL + '/api/v1/plugins/latest-version'