diff --git a/server/src/models/User.ts b/server/src/models/User.ts index 67b944b9..f51177a1 100644 --- a/server/src/models/User.ts +++ b/server/src/models/User.ts @@ -15,10 +15,6 @@ class User extends Model implements User public id!: number; public email!: string; public password!: string; - - public async isValidPassword(password: string): Promise { - return comparePassword(password, this.password); - } } User.init( @@ -44,13 +40,6 @@ User.init( { sequelize, tableName: 'user', - hooks: { - beforeCreate: async (user: User) => { - if (user.password) { - user.password = await hashPassword(user.password) as string; - } - }, - }, } );