aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/user
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-07-11 17:04:57 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-07-11 17:05:55 +0200
commit075f16caac5236cb04c98ae7b3a989766d764bb3 (patch)
tree9a30024aa771735a28d83d9a166033b82dbcaf60 /server/models/user
parent4e979c3e1b81f4762025d9db3052b1f70774b3bb (diff)
downloadPeerTube-075f16caac5236cb04c98ae7b3a989766d764bb3.tar.gz
PeerTube-075f16caac5236cb04c98ae7b3a989766d764bb3.tar.zst
PeerTube-075f16caac5236cb04c98ae7b3a989766d764bb3.zip
Remove "function" in favor of () => {}
Diffstat (limited to 'server/models/user')
-rw-r--r--server/models/user/user.ts6
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 }