User model
parent
15fee6c83d
commit
72bc53b6a4
|
@ -12,7 +12,9 @@ const UserSchema = new Schema({
|
|||
username: {
|
||||
type: String, lowercase: true, unique: true, required: [true, "can't be blank"], match: [/^[a-zA-Z0-9]+$/, 'is invalid'], index: true,
|
||||
},
|
||||
password: String,
|
||||
password: {
|
||||
type: String, required: [true, "can't be blank"],
|
||||
},
|
||||
}, { timestamps: true });
|
||||
|
||||
module.exports = UserSchema;
|
||||
|
|
Loading…
Reference in New Issue