diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-06-05 21:53:49 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-06-05 21:53:49 +0200 |
commit | 4d4e5cd4dca78480ec7f40e747f424cd107376a4 (patch) | |
tree | 1b132aab503751ae0f4c8ee6c7595ad2d65f3a50 /server/helpers/custom-validators | |
parent | e02643f32e4c97ca307f8fc5b69be79c40d70a3b (diff) | |
download | PeerTube-4d4e5cd4dca78480ec7f40e747f424cd107376a4.tar.gz PeerTube-4d4e5cd4dca78480ec7f40e747f424cd107376a4.tar.zst PeerTube-4d4e5cd4dca78480ec7f40e747f424cd107376a4.zip |
require -> import
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r-- | server/helpers/custom-validators/pods.ts | 4 | ||||
-rw-r--r-- | server/helpers/custom-validators/users.ts | 4 | ||||
-rw-r--r-- | server/helpers/custom-validators/videos.ts | 4 |
3 files changed, 3 insertions, 9 deletions
diff --git a/server/helpers/custom-validators/pods.ts b/server/helpers/custom-validators/pods.ts index e4c827feb..ee939ad04 100644 --- a/server/helpers/custom-validators/pods.ts +++ b/server/helpers/custom-validators/pods.ts | |||
@@ -1,6 +1,4 @@ | |||
1 | import expressValidator = require('express-validator') | 1 | import * as validator from 'validator' |
2 | // TODO: use .validator when express-validator typing will have validator field | ||
3 | const validator = expressValidator['validator'] | ||
4 | 2 | ||
5 | import { isArray } from './misc' | 3 | import { isArray } from './misc' |
6 | 4 | ||
diff --git a/server/helpers/custom-validators/users.ts b/server/helpers/custom-validators/users.ts index 8fd2dac4f..f303ab8db 100644 --- a/server/helpers/custom-validators/users.ts +++ b/server/helpers/custom-validators/users.ts | |||
@@ -1,7 +1,5 @@ | |||
1 | import { values } from 'lodash' | 1 | import { values } from 'lodash' |
2 | import expressValidator = require('express-validator') | 2 | import * as validator from 'validator' |
3 | // TODO: use .validator when express-validator typing will have validator field | ||
4 | const validator = expressValidator['validator'] | ||
5 | 3 | ||
6 | import { CONSTRAINTS_FIELDS, USER_ROLES } from '../../initializers' | 4 | import { CONSTRAINTS_FIELDS, USER_ROLES } from '../../initializers' |
7 | const USERS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.USERS | 5 | const USERS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.USERS |
diff --git a/server/helpers/custom-validators/videos.ts b/server/helpers/custom-validators/videos.ts index 2b2370be4..6389998e1 100644 --- a/server/helpers/custom-validators/videos.ts +++ b/server/helpers/custom-validators/videos.ts | |||
@@ -1,7 +1,5 @@ | |||
1 | import { values } from 'lodash' | 1 | import { values } from 'lodash' |
2 | import expressValidator = require('express-validator') | 2 | import * as validator from 'validator' |
3 | // TODO: use .validator when express-validator typing will have validator field | ||
4 | const validator = expressValidator['validator'] | ||
5 | 3 | ||
6 | import { | 4 | import { |
7 | CONSTRAINTS_FIELDS, | 5 | CONSTRAINTS_FIELDS, |