diff options
Diffstat (limited to 'server/helpers/custom-validators/accounts.ts')
-rw-r--r-- | server/helpers/custom-validators/accounts.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/helpers/custom-validators/accounts.ts b/server/helpers/custom-validators/accounts.ts index 8dc5d1f0d..a46ffc162 100644 --- a/server/helpers/custom-validators/accounts.ts +++ b/server/helpers/custom-validators/accounts.ts | |||
@@ -3,12 +3,16 @@ import { Response } from 'express' | |||
3 | import 'express-validator' | 3 | import 'express-validator' |
4 | import * as validator from 'validator' | 4 | import * as validator from 'validator' |
5 | import { AccountModel } from '../../models/account/account' | 5 | import { AccountModel } from '../../models/account/account' |
6 | import { isUserUsernameValid } from './users' | 6 | import { isUserDescriptionValid, isUserUsernameValid } from './users' |
7 | 7 | ||
8 | function isAccountNameValid (value: string) { | 8 | function isAccountNameValid (value: string) { |
9 | return isUserUsernameValid(value) | 9 | return isUserUsernameValid(value) |
10 | } | 10 | } |
11 | 11 | ||
12 | function isAccountDescriptionValid (value: string) { | ||
13 | return isUserDescriptionValid(value) | ||
14 | } | ||
15 | |||
12 | function isAccountIdExist (id: number | string, res: Response) { | 16 | function isAccountIdExist (id: number | string, res: Response) { |
13 | let promise: Bluebird<AccountModel> | 17 | let promise: Bluebird<AccountModel> |
14 | 18 | ||
@@ -48,5 +52,6 @@ async function isAccountExist (p: Bluebird<AccountModel>, res: Response) { | |||
48 | export { | 52 | export { |
49 | isAccountIdExist, | 53 | isAccountIdExist, |
50 | isLocalAccountNameExist, | 54 | isLocalAccountNameExist, |
55 | isAccountDescriptionValid, | ||
51 | isAccountNameValid | 56 | isAccountNameValid |
52 | } | 57 | } |