1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Refractor validators

This commit is contained in:
Chocobozzz 2017-11-27 17:30:46 +01:00
parent fcaf1e0aa8
commit a2431b7dcb
No known key found for this signature in database
GPG key ID: 583A612D890159BE
33 changed files with 478 additions and 643 deletions

View file

@ -1,12 +1,16 @@
import * as express from 'express'
import { CONFIG, PREVIEWS_SIZE, EMBED_SIZE } from '../initializers'
import { CONFIG, EMBED_SIZE, PREVIEWS_SIZE } from '../initializers'
import { oembedValidator } from '../middlewares'
import { asyncMiddleware } from '../middlewares/async'
import { VideoInstance } from '../models'
const servicesRouter = express.Router()
servicesRouter.use('/oembed', oembedValidator, generateOEmbed)
servicesRouter.use('/oembed',
asyncMiddleware(oembedValidator),
generateOEmbed
)
// ---------------------------------------------------------------------------