diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-07 10:07:53 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-08 09:30:31 +0200 |
commit | a84b8fa5cf6e4cafb841af3db9bdfcc9531c09a4 (patch) | |
tree | cf2feafcfadb5b6e9784c86d67e692db8d599b7d /server/controllers/api/config.ts | |
parent | 990b6a0b0c4fbebc165e5cf7cec8fbc1cbaa6c66 (diff) | |
download | PeerTube-a84b8fa5cf6e4cafb841af3db9bdfcc9531c09a4.tar.gz PeerTube-a84b8fa5cf6e4cafb841af3db9bdfcc9531c09a4.tar.zst PeerTube-a84b8fa5cf6e4cafb841af3db9bdfcc9531c09a4.zip |
Add import.video.torrent configuration
Diffstat (limited to 'server/controllers/api/config.ts')
-rw-r--r-- | server/controllers/api/config.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts index 950a1498e..6f05c33db 100644 --- a/server/controllers/api/config.ts +++ b/server/controllers/api/config.ts | |||
@@ -9,7 +9,7 @@ import { CONFIG, CONSTRAINTS_FIELDS, reloadConfig } from '../../initializers' | |||
9 | import { asyncMiddleware, authenticate, ensureUserHasRight } from '../../middlewares' | 9 | import { asyncMiddleware, authenticate, ensureUserHasRight } from '../../middlewares' |
10 | import { customConfigUpdateValidator } from '../../middlewares/validators/config' | 10 | import { customConfigUpdateValidator } from '../../middlewares/validators/config' |
11 | import { ClientHtml } from '../../lib/client-html' | 11 | import { ClientHtml } from '../../lib/client-html' |
12 | import { CustomConfigAuditView, auditLoggerFactory } from '../../helpers/audit-logger' | 12 | import { auditLoggerFactory, CustomConfigAuditView } from '../../helpers/audit-logger' |
13 | 13 | ||
14 | const packageJSON = require('../../../../package.json') | 14 | const packageJSON = require('../../../../package.json') |
15 | const configRouter = express.Router() | 15 | const configRouter = express.Router() |
@@ -69,6 +69,9 @@ async function getConfig (req: express.Request, res: express.Response, next: exp | |||
69 | videos: { | 69 | videos: { |
70 | http: { | 70 | http: { |
71 | enabled: CONFIG.IMPORT.VIDEOS.HTTP.ENABLED | 71 | enabled: CONFIG.IMPORT.VIDEOS.HTTP.ENABLED |
72 | }, | ||
73 | torrent: { | ||
74 | enabled: CONFIG.IMPORT.VIDEOS.TORRENT.ENABLED | ||
72 | } | 75 | } |
73 | } | 76 | } |
74 | }, | 77 | }, |
@@ -237,6 +240,9 @@ function customConfig (): CustomConfig { | |||
237 | videos: { | 240 | videos: { |
238 | http: { | 241 | http: { |
239 | enabled: CONFIG.IMPORT.VIDEOS.HTTP.ENABLED | 242 | enabled: CONFIG.IMPORT.VIDEOS.HTTP.ENABLED |
243 | }, | ||
244 | torrent: { | ||
245 | enabled: CONFIG.IMPORT.VIDEOS.TORRENT.ENABLED | ||
240 | } | 246 | } |
241 | } | 247 | } |
242 | } | 248 | } |