aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/services.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-27 17:30:46 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:43:01 +0100
commita2431b7dcbc72c05101dcdbe631ff84a823aeb51 (patch)
tree09278a822905622a70ff976a75e09d99bc45639a /server/controllers/services.ts
parentfcaf1e0aa84213a1b1f1b1a44a3276eae35ebe70 (diff)
downloadPeerTube-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.ts8
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 @@
1import * as express from 'express' 1import * as express from 'express'
2 2
3import { CONFIG, PREVIEWS_SIZE, EMBED_SIZE } from '../initializers' 3import { CONFIG, EMBED_SIZE, PREVIEWS_SIZE } from '../initializers'
4import { oembedValidator } from '../middlewares' 4import { oembedValidator } from '../middlewares'
5import { asyncMiddleware } from '../middlewares/async'
5import { VideoInstance } from '../models' 6import { VideoInstance } from '../models'
6 7
7const servicesRouter = express.Router() 8const servicesRouter = express.Router()
8 9
9servicesRouter.use('/oembed', oembedValidator, generateOEmbed) 10servicesRouter.use('/oembed',
11 asyncMiddleware(oembedValidator),
12 generateOEmbed
13)
10 14
11// --------------------------------------------------------------------------- 15// ---------------------------------------------------------------------------
12 16