mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-12 10:52:47 +00:00
updated bunch of file paths and changed the way posts are loaded
This commit is contained in:
8
node_modules/mongoose/examples/geospatial/person.js
generated
vendored
8
node_modules/mongoose/examples/geospatial/person.js
generated
vendored
@@ -18,10 +18,10 @@ module.exports = function() {
|
||||
|
||||
// define a method to find the closest person
|
||||
PersonSchema.methods.findClosest = function(cb) {
|
||||
return this.model('Person').find({
|
||||
loc : { $nearSphere : this.loc },
|
||||
name : { $ne : this.name }
|
||||
}).limit(1).exec(cb);
|
||||
return this.model('Person').find({
|
||||
loc : { $nearSphere : this.loc },
|
||||
name : { $ne : this.name }
|
||||
}).limit(1).exec(cb);
|
||||
};
|
||||
|
||||
mongoose.model('Person', PersonSchema);
|
||||
|
||||
Reference in New Issue
Block a user