diff options
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/plugins/plugin-index.ts | 7 |
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 | |||
10 | import { PluginModel } from '../../models/server/plugin' | 10 | import { PluginModel } from '../../models/server/plugin' |
11 | import { PluginManager } from './plugin-manager' | 11 | import { PluginManager } from './plugin-manager' |
12 | import { logger } from '../../helpers/logger' | 12 | import { logger } from '../../helpers/logger' |
13 | 13 | import { PEERTUBE_VERSION } from '../../initializers/constants' | |
14 | const packageJSON = require('../../../../package.json') | ||
15 | 14 | ||
16 | async function listAvailablePluginsFromIndex (options: PeertubePluginIndexList) { | 15 | async 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>) | |||
53 | async function getLatestPluginsVersion (npmNames: string[]): Promise<PeertubePluginLatestVersionResponse> { | 52 | async 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' |