diff options
Diffstat (limited to 'server/controllers/services.ts')
-rw-r--r-- | server/controllers/services.ts | 8 |
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 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | |||
3 | import { CONFIG, EMBED_SIZE, PREVIEWS_SIZE } from '../initializers' | 2 | import { CONFIG, EMBED_SIZE, PREVIEWS_SIZE } from '../initializers' |
4 | import { oembedValidator } from '../middlewares' | 3 | import { asyncMiddleware, oembedValidator } from '../middlewares' |
5 | import { asyncMiddleware } from '../middlewares/async' | 4 | import { VideoModel } from '../models/video/video' |
6 | import { VideoInstance } from '../models' | ||
7 | 5 | ||
8 | const servicesRouter = express.Router() | 6 | const servicesRouter = express.Router() |
9 | 7 | ||
@@ -21,7 +19,7 @@ export { | |||
21 | // --------------------------------------------------------------------------- | 19 | // --------------------------------------------------------------------------- |
22 | 20 | ||
23 | function generateOEmbed (req: express.Request, res: express.Response, next: express.NextFunction) { | 21 | function 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) |