diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-12 17:53:50 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-13 16:50:33 +0100 |
commit | 3fd3ab2d34d512b160a5e6084d7609be7b4f4452 (patch) | |
tree | e5ca358287fca6ecacce83defcf23af1e8e9f419 /server/controllers/services.ts | |
parent | c893d4514e6ecbf282c7985fe5f82b8acd8a1137 (diff) | |
download | PeerTube-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.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) |