From 075f16caac5236cb04c98ae7b3a989766d764bb3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 11 Jul 2017 17:04:57 +0200 Subject: Remove "function" in favor of () => {} --- server/models/user/user.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/models/user/user.ts') 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 type: DataTypes.STRING, allowNull: false, validate: { - passwordValid: function (value) { + passwordValid: value => { const res = isUserPasswordValid(value) if (res === false) throw new Error('Password not valid.') } @@ -48,7 +48,7 @@ export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.Da type: DataTypes.STRING, allowNull: false, validate: { - usernameValid: function (value) { + usernameValid: value => { const res = isUserUsernameValid(value) if (res === false) throw new Error('Username not valid.') } @@ -66,7 +66,7 @@ export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.Da allowNull: false, defaultValue: false, validate: { - nsfwValid: function (value) { + nsfwValid: value => { const res = isUserDisplayNSFWValid(value) if (res === false) throw new Error('Display NSFW is not valid.') } -- cgit v1.2.3