User model

pull/1/head
sundowndev 2018-11-14 18:15:53 +01:00
parent 15fee6c83d
commit 72bc53b6a4
1 changed files with 3 additions and 1 deletions

View File

@ -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;