This commit is contained in:
les
2019-09-11 19:12:24 +02:00
parent 93baf01a55
commit 2fe956d117
65 changed files with 762 additions and 721 deletions

View File

@@ -18,7 +18,7 @@ module.exports = (sequelize, DataTypes) => {
settings: DataTypes.JSON,
email: {
type: DataTypes.STRING,
unique: { msg: 'error.email_taken' },
unique: { msg: 'error.email_taken' },
index: true,
allowNull: false
},
@@ -46,7 +46,7 @@ module.exports = (sequelize, DataTypes) => {
}
user.prototype.comparePassword = async function (pwd) {
if (!this.password) return false
if (!this.password) { return false }
const ret = await bcrypt.compare(pwd, this.password)
return ret
}
@@ -78,4 +78,4 @@ module.exports = (sequelize, DataTypes) => {
})
return user
};
}