got node freegeoip to work again

This commit is contained in:
David Baldwynn 2016-06-17 14:55:41 -07:00
parent afeb7aaf2a
commit d7ce5f7b70
2 changed files with 2 additions and 2 deletions

View file

@ -253,7 +253,7 @@ FormSubmissionSchema.pre('save', function (next){
if(this.isModified('ipAddr') || !this.geoLocation){
freegeoip.getLocation(this.ipAddr, function(err, location){
if(err) return next(err);
//self.geoLocation = JSON.parse(location);
self.geoLocation = JSON.parse(location);
return next();
});
}

View file

@ -315,7 +315,7 @@
{{row.device.name}}, {{row.device.type}}
</td>
<td>
{{row.geoLocation.city}}, {{row.geoLocation.country}}
{{row.geoLocation.city}}, {{row.geoLocation.country_name}}
</td>
<td>
{{row.ipAddr}}