Spaces:
Sleeping
Sleeping
Update models.js
Browse files
models.js
CHANGED
|
@@ -36,7 +36,7 @@ const UserSchema = new mongoose.Schema({
|
|
| 36 |
pendingSchoolData: {
|
| 37 |
name: String,
|
| 38 |
code: String,
|
| 39 |
-
type: String //
|
| 40 |
}
|
| 41 |
});
|
| 42 |
const User = mongoose.model('User', UserSchema);
|
|
|
|
| 36 |
pendingSchoolData: {
|
| 37 |
name: String,
|
| 38 |
code: String,
|
| 39 |
+
type: { type: String } // FIXED: Wrapped in object to avoid Mongoose interpreting parent as String type
|
| 40 |
}
|
| 41 |
});
|
| 42 |
const User = mongoose.model('User', UserSchema);
|