diff options
author | Chocobozzz <me@florianbigard.com> | 2019-04-11 11:33:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-04-11 13:45:39 +0200 |
commit | 6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0 (patch) | |
tree | b47de7efb8c6c611c63a15a971c6125a278f547a /server/controllers/services.ts | |
parent | 2c3abc4fa796555eb7d25f416c4f41ab3e3ad8ca (diff) | |
download | PeerTube-6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0.tar.gz PeerTube-6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0.tar.zst PeerTube-6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0.zip |
Move config in its own file
Diffstat (limited to 'server/controllers/services.ts')
-rw-r--r-- | server/controllers/services.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/services.ts b/server/controllers/services.ts index cf7a513af..83b01b475 100644 --- a/server/controllers/services.ts +++ b/server/controllers/services.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { CONFIG, EMBED_SIZE, PREVIEWS_SIZE } from '../initializers' | 2 | import { EMBED_SIZE, PREVIEWS_SIZE, WEBSERVER } from '../initializers' |
3 | import { asyncMiddleware, oembedValidator } from '../middlewares' | 3 | import { asyncMiddleware, oembedValidator } from '../middlewares' |
4 | import { accountNameWithHostGetValidator } from '../middlewares/validators' | 4 | import { accountNameWithHostGetValidator } from '../middlewares/validators' |
5 | import { VideoModel } from '../models/video/video' | 5 | import { CONFIG } from '../initializers/config' |
6 | 6 | ||
7 | const servicesRouter = express.Router() | 7 | const servicesRouter = express.Router() |
8 | 8 | ||
@@ -25,7 +25,7 @@ export { | |||
25 | 25 | ||
26 | function generateOEmbed (req: express.Request, res: express.Response) { | 26 | function generateOEmbed (req: express.Request, res: express.Response) { |
27 | const video = res.locals.video | 27 | const video = res.locals.video |
28 | const webserverUrl = CONFIG.WEBSERVER.URL | 28 | const webserverUrl = WEBSERVER.URL |
29 | const maxHeight = parseInt(req.query.maxheight, 10) | 29 | const maxHeight = parseInt(req.query.maxheight, 10) |
30 | const maxWidth = parseInt(req.query.maxwidth, 10) | 30 | const maxWidth = parseInt(req.query.maxwidth, 10) |
31 | 31 | ||