diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 17:30:46 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:43:01 +0100 |
commit | a2431b7dcbc72c05101dcdbe631ff84a823aeb51 (patch) | |
tree | 09278a822905622a70ff976a75e09d99bc45639a /server/controllers/services.ts | |
parent | fcaf1e0aa84213a1b1f1b1a44a3276eae35ebe70 (diff) | |
download | PeerTube-a2431b7dcbc72c05101dcdbe631ff84a823aeb51.tar.gz PeerTube-a2431b7dcbc72c05101dcdbe631ff84a823aeb51.tar.zst PeerTube-a2431b7dcbc72c05101dcdbe631ff84a823aeb51.zip |
Refractor validators
Diffstat (limited to 'server/controllers/services.ts')
-rw-r--r-- | server/controllers/services.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/server/controllers/services.ts b/server/controllers/services.ts index 0db6e5498..0c325678c 100644 --- a/server/controllers/services.ts +++ b/server/controllers/services.ts | |||
@@ -1,12 +1,16 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | 2 | ||
3 | import { CONFIG, PREVIEWS_SIZE, EMBED_SIZE } from '../initializers' | 3 | import { CONFIG, EMBED_SIZE, PREVIEWS_SIZE } from '../initializers' |
4 | import { oembedValidator } from '../middlewares' | 4 | import { oembedValidator } from '../middlewares' |
5 | import { asyncMiddleware } from '../middlewares/async' | ||
5 | import { VideoInstance } from '../models' | 6 | import { VideoInstance } from '../models' |
6 | 7 | ||
7 | const servicesRouter = express.Router() | 8 | const servicesRouter = express.Router() |
8 | 9 | ||
9 | servicesRouter.use('/oembed', oembedValidator, generateOEmbed) | 10 | servicesRouter.use('/oembed', |
11 | asyncMiddleware(oembedValidator), | ||
12 | generateOEmbed | ||
13 | ) | ||
10 | 14 | ||
11 | // --------------------------------------------------------------------------- | 15 | // --------------------------------------------------------------------------- |
12 | 16 | ||