aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/oembed.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/oembed.ts')
-rw-r--r--server/middlewares/validators/oembed.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/middlewares/validators/oembed.ts b/server/middlewares/validators/oembed.ts
index 31f06dc65..fb7b726e5 100644
--- a/server/middlewares/validators/oembed.ts
+++ b/server/middlewares/validators/oembed.ts
@@ -1,10 +1,11 @@
1import * as express from 'express' 1import * as express from 'express'
2import { query } from 'express-validator/check' 2import { query } from 'express-validator/check'
3import { join } from 'path' 3import { join } from 'path'
4import { isIdOrUUIDValid, isTestInstance, logger } from '../../helpers' 4import { isTestInstance, logger } from '../../helpers'
5import { isIdOrUUIDValid } from '../../helpers/custom-validators/misc'
6import { isVideoExist } from '../../helpers/custom-validators/videos'
5import { CONFIG } from '../../initializers' 7import { CONFIG } from '../../initializers'
6import { areValidationErrors } from './utils' 8import { areValidationErrors } from './utils'
7import { isVideoExist } from '../../helpers/custom-validators/videos'
8 9
9const urlShouldStartWith = CONFIG.WEBSERVER.SCHEME + '://' + join(CONFIG.WEBSERVER.HOST, 'videos', 'watch') + '/' 10const urlShouldStartWith = CONFIG.WEBSERVER.SCHEME + '://' + join(CONFIG.WEBSERVER.HOST, 'videos', 'watch') + '/'
10const videoWatchRegex = new RegExp('([^/]+)$') 11const videoWatchRegex = new RegExp('([^/]+)$')