@@ -11,7 +11,13 @@ const GallerySchema = new mongoose.Schema({
required: true
},
tags: [String],
- images: [String]
+ images: [String],
+ location: {
+ type: {type: String},
+ coordinates: [],
+ required: false
+ }
});
+GallerySchema.index({location: "2dsphere"});
module.exports = mongoose.model("Gallery", GallerySchema);