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){
|
if(this.isModified('ipAddr') || !this.geoLocation){
|
||||||
freegeoip.getLocation(this.ipAddr, function(err, location){
|
freegeoip.getLocation(this.ipAddr, function(err, location){
|
||||||
if(err) return next(err);
|
if(err) return next(err);
|
||||||
//self.geoLocation = JSON.parse(location);
|
self.geoLocation = JSON.parse(location);
|
||||||
return next();
|
return next();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -315,7 +315,7 @@
|
||||||
{{row.device.name}}, {{row.device.type}}
|
{{row.device.name}}, {{row.device.type}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{row.geoLocation.city}}, {{row.geoLocation.country}}
|
{{row.geoLocation.city}}, {{row.geoLocation.country_name}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{row.ipAddr}}
|
{{row.ipAddr}}
|
||||||
|
|
Loading…
Reference in a new issue