Added role field to User model

This commit is contained in:
Alex Holliday committed 2024-07-02 10:24:06 -07:00
1 parent 754079d5c4
commit 898738e287
1 file changed
+5
+5
View File
@@ -31,6 +31,11 @@ const UserSchema = mongoose.Schema(
type: Boolean,
default: false,
},
role: {
type: String,
default: "user",
enum: ["user", "admin"],
},
},
{
timestamps: true,