Improve device location system with more safeguards

This commit is contained in:
Daniel 2022-06-09 14:36:03 +02:00
parent b392a1e8ff
commit 86d4f64d42
2 changed files with 80 additions and 73 deletions

View file

@ -55,7 +55,7 @@ func registerAPIEndpoints() error {
Read: api.PermitUser,
BelongsTo: module,
StructFunc: func(ar *api.Request) (i interface{}, err error) {
return getLocationFromTraceroute()
return getLocationFromTraceroute(&DeviceLocations{})
},
Name: "Get Approximate Internet Location via Traceroute",
Description: "Returns an approximation of where the device is on the Internet using a the traceroute technique.",