Hi.
I have this schema:
new mongoose.Schema({
name: {
type: String,
required: true
},
location: {
type: {
type: String,
default: 'Point',
enum: ['Point']
},
coordinates: [Number],
address: String,
description: String
}
})
Location isn’t required, but if I’m sending only a name in my request, I’m getting this error: MongoServerError: Can't extract geo keys:
How do I make location not required?
Thanks!