aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-04-10 15:07:54 +0200
committerChocobozzz <me@florianbigard.com>2020-04-10 15:23:25 +0200
commit5e2b2e2775421cd98286d6e2f75cf38aae7a212c (patch)
treed92e32824d83cecbe5e90206738f393b47e55754 /server/typings
parent9afa0901f11c321e071c42ba3c814a3af4843c55 (diff)
downloadPeerTube-5e2b2e2775421cd98286d6e2f75cf38aae7a212c.tar.gz
PeerTube-5e2b2e2775421cd98286d6e2f75cf38aae7a212c.tar.zst
PeerTube-5e2b2e2775421cd98286d6e2f75cf38aae7a212c.zip
Add ability for plugins to add custom routes
Diffstat (limited to 'server/typings')
-rw-r--r--server/typings/plugins/register-server-option.model.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/typings/plugins/register-server-option.model.ts b/server/typings/plugins/register-server-option.model.ts
index fda9afb11..3d6217d1b 100644
--- a/server/typings/plugins/register-server-option.model.ts
+++ b/server/typings/plugins/register-server-option.model.ts
@@ -6,6 +6,7 @@ import { PluginVideoCategoryManager } from '../../../shared/models/plugins/plugi
6import { PluginVideoLanguageManager } from '../../../shared/models/plugins/plugin-video-language-manager.model' 6import { PluginVideoLanguageManager } from '../../../shared/models/plugins/plugin-video-language-manager.model'
7import { PluginVideoLicenceManager } from '../../../shared/models/plugins/plugin-video-licence-manager.model' 7import { PluginVideoLicenceManager } from '../../../shared/models/plugins/plugin-video-licence-manager.model'
8import { Logger } from 'winston' 8import { Logger } from 'winston'
9import { Router } from 'express'
9 10
10export type PeerTubeHelpers = { 11export type PeerTubeHelpers = {
11 logger: Logger 12 logger: Logger
@@ -32,5 +33,11 @@ export type RegisterServerOptions = {
32 videoLanguageManager: PluginVideoLanguageManager 33 videoLanguageManager: PluginVideoLanguageManager
33 videoLicenceManager: PluginVideoLicenceManager 34 videoLicenceManager: PluginVideoLicenceManager
34 35
36 // Get plugin router to create custom routes
37 // Base routes of this router are
38 // * /plugins/:pluginName/:pluginVersion/router/...
39 // * /plugins/:pluginName/router/...
40 getRouter(): Router
41
35 peertubeHelpers: PeerTubeHelpers 42 peertubeHelpers: PeerTubeHelpers
36} 43}