aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/services.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-12 17:53:50 +0100
committerChocobozzz <me@florianbigard.com>2017-12-13 16:50:33 +0100
commit3fd3ab2d34d512b160a5e6084d7609be7b4f4452 (patch)
treee5ca358287fca6ecacce83defcf23af1e8e9f419 /server/controllers/services.ts
parentc893d4514e6ecbf282c7985fe5f82b8acd8a1137 (diff)
downloadPeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.tar.gz
PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.tar.zst
PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.zip
Move models to typescript-sequelize
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)