got node freegeoip to work again
This commit is contained in:
parent
afeb7aaf2a
commit
d7ce5f7b70
|
@ -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();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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}}
|
||||
|
|
Loading…
Reference in a new issue