mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
Refractor validators
This commit is contained in:
parent
fcaf1e0aa8
commit
a2431b7dcb
33 changed files with 478 additions and 643 deletions
|
@ -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
|
||||
)
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue