Added role field to User model
This commit is contained in:
1 parent
754079d5c4
commit
898738e287
1 file changed
+5
@@ -31,6 +31,11 @@ const UserSchema = mongoose.Schema(
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
role: {
|
||||||
|
type: String,
|
||||||
|
default: "user",
|
||||||
|
enum: ["user", "admin"],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
timestamps: true,
|
timestamps: true,
|
||||||
|
|||||||
Reference in new issue
Block a user