aboutsummaryrefslogtreecommitdiffstats
path: root/server/models
diff options
context:
space:
mode:
Diffstat (limited to 'server/models')
-rw-r--r--server/models/User.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/server/models/User.js b/server/models/User.js
index 6773c64..968673e 100644
--- a/server/models/User.js
+++ b/server/models/User.js
@@ -1,7 +1,15 @@
const mongoose = require('mongoose');
+
const UserSchema = new mongoose.Schema({
- username: { type: String, reauired: true, unique: true },
- password: { type: String, required: true },
- role: { type: String, default: 'admin' },
+ email: {
+ type: String,
+ required: true,
+ unique: true,
+ },
+ password: {
+ type: String,
+ required: true,
+ },
});
+
module.exports = mongoose.model('User', UserSchema);