diff --git a/app/models/user.js b/app/models/user.js index e0bbbe5..4f8b98b 100644 --- a/app/models/user.js +++ b/app/models/user.js @@ -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;