diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-12 17:53:50 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-13 16:50:33 +0100 |
commit | 3fd3ab2d34d512b160a5e6084d7609be7b4f4452 (patch) | |
tree | e5ca358287fca6ecacce83defcf23af1e8e9f419 /server/middlewares/validators/oembed.ts | |
parent | c893d4514e6ecbf282c7985fe5f82b8acd8a1137 (diff) | |
download | PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.tar.gz PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.tar.zst PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.zip |
Move models to typescript-sequelize
Diffstat (limited to 'server/middlewares/validators/oembed.ts')
-rw-r--r-- | server/middlewares/validators/oembed.ts | 5 |
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 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { query } from 'express-validator/check' | 2 | import { query } from 'express-validator/check' |
3 | import { join } from 'path' | 3 | import { join } from 'path' |
4 | import { isIdOrUUIDValid, isTestInstance, logger } from '../../helpers' | 4 | import { isTestInstance, logger } from '../../helpers' |
5 | import { isIdOrUUIDValid } from '../../helpers/custom-validators/misc' | ||
6 | import { isVideoExist } from '../../helpers/custom-validators/videos' | ||
5 | import { CONFIG } from '../../initializers' | 7 | import { CONFIG } from '../../initializers' |
6 | import { areValidationErrors } from './utils' | 8 | import { areValidationErrors } from './utils' |
7 | import { isVideoExist } from '../../helpers/custom-validators/videos' | ||
8 | 9 | ||
9 | const urlShouldStartWith = CONFIG.WEBSERVER.SCHEME + '://' + join(CONFIG.WEBSERVER.HOST, 'videos', 'watch') + '/' | 10 | const urlShouldStartWith = CONFIG.WEBSERVER.SCHEME + '://' + join(CONFIG.WEBSERVER.HOST, 'videos', 'watch') + '/' |
10 | const videoWatchRegex = new RegExp('([^/]+)$') | 11 | const videoWatchRegex = new RegExp('([^/]+)$') |