User fixes

This commit is contained in:
Sebastian Rindom committed 2020-04-03 15:43:40 +02:00
1 parent c82c9f3733
commit 6ae1a1d25e
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -9,7 +9,8 @@ class UserModel extends BaseModel {
static modelName = "User" static modelName = "User"
static schema = { static schema = {
email: { type: String, required: true }, email: { type: String, required: true },
passwordHash: { type: String }, name: { type: String },
password_hash: { type: String },
metadata: { type: mongoose.Schema.Types.Mixed, default: {} }, metadata: { type: mongoose.Schema.Types.Mixed, default: {} },
} }
} }
+1 -1
View File
@@ -143,7 +143,7 @@ class UserService extends BaseService {
return this.userModel_.updateOne( return this.userModel_.updateOne(
{ _id: user._id }, { _id: user._id },
{ $set: { password: hashedPassword } } { $set: { password_hash: hashedPassword } }
) )
} }