aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/services.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/services.ts')
-rw-r--r--server/controllers/services.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/server/controllers/services.ts b/server/controllers/services.ts
index 0c325678c..3ac78a5df 100644
--- a/server/controllers/services.ts
+++ b/server/controllers/services.ts
@@ -1,9 +1,7 @@
1import * as express from 'express' 1import * as express from 'express'
2
3import { CONFIG, EMBED_SIZE, PREVIEWS_SIZE } from '../initializers' 2import { CONFIG, EMBED_SIZE, PREVIEWS_SIZE } from '../initializers'
4import { oembedValidator } from '../middlewares' 3import { asyncMiddleware, oembedValidator } from '../middlewares'
5import { asyncMiddleware } from '../middlewares/async' 4import { VideoModel } from '../models/video/video'
6import { VideoInstance } from '../models'
7 5
8const servicesRouter = express.Router() 6const servicesRouter = express.Router()
9 7
@@ -21,7 +19,7 @@ export {
21// --------------------------------------------------------------------------- 19// ---------------------------------------------------------------------------
22 20
23function generateOEmbed (req: express.Request, res: express.Response, next: express.NextFunction) { 21function generateOEmbed (req: express.Request, res: express.Response, next: express.NextFunction) {
24 const video = res.locals.video as VideoInstance 22 const video = res.locals.video as VideoModel
25 const webserverUrl = CONFIG.WEBSERVER.URL 23 const webserverUrl = CONFIG.WEBSERVER.URL
26 const maxHeight = parseInt(req.query.maxheight, 10) 24 const maxHeight = parseInt(req.query.maxheight, 10)
27 const maxWidth = parseInt(req.query.maxwidth, 10) 25 const maxWidth = parseInt(req.query.maxwidth, 10)