diff options
Diffstat (limited to 'server/models/user')
-rw-r--r-- | server/models/user/user.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/models/user/user.ts b/server/models/user/user.ts index 5ff81e741..bda95d2f6 100644 --- a/server/models/user/user.ts +++ b/server/models/user/user.ts | |||
@@ -38,7 +38,7 @@ export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.Da | |||
38 | type: DataTypes.STRING, | 38 | type: DataTypes.STRING, |
39 | allowNull: false, | 39 | allowNull: false, |
40 | validate: { | 40 | validate: { |
41 | passwordValid: function (value) { | 41 | passwordValid: value => { |
42 | const res = isUserPasswordValid(value) | 42 | const res = isUserPasswordValid(value) |
43 | if (res === false) throw new Error('Password not valid.') | 43 | if (res === false) throw new Error('Password not valid.') |
44 | } | 44 | } |
@@ -48,7 +48,7 @@ export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.Da | |||
48 | type: DataTypes.STRING, | 48 | type: DataTypes.STRING, |
49 | allowNull: false, | 49 | allowNull: false, |
50 | validate: { | 50 | validate: { |
51 | usernameValid: function (value) { | 51 | usernameValid: value => { |
52 | const res = isUserUsernameValid(value) | 52 | const res = isUserUsernameValid(value) |
53 | if (res === false) throw new Error('Username not valid.') | 53 | if (res === false) throw new Error('Username not valid.') |
54 | } | 54 | } |
@@ -66,7 +66,7 @@ export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.Da | |||
66 | allowNull: false, | 66 | allowNull: false, |
67 | defaultValue: false, | 67 | defaultValue: false, |
68 | validate: { | 68 | validate: { |
69 | nsfwValid: function (value) { | 69 | nsfwValid: value => { |
70 | const res = isUserDisplayNSFWValid(value) | 70 | const res = isUserDisplayNSFWValid(value) |
71 | if (res === false) throw new Error('Display NSFW is not valid.') | 71 | if (res === false) throw new Error('Display NSFW is not valid.') |
72 | } | 72 | } |