mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-24 07:41:06 +00:00
Fix location
This commit is contained in:
+2
-2
@@ -6,8 +6,8 @@ declare module 'iplocation' {
|
|||||||
country?: string;
|
country?: string;
|
||||||
countryCode?: string;
|
countryCode?: string;
|
||||||
isp?: string;
|
isp?: string;
|
||||||
lat: number;
|
latitude: number;
|
||||||
lon: number;
|
longitude: number;
|
||||||
org?: string;
|
org?: string;
|
||||||
query?: string;
|
query?: string;
|
||||||
region?: string;
|
region?: string;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export async function locate(ip: string): Promise<Maybe<Location>> {
|
|||||||
return resolve(null);
|
return resolve(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { lat, lon } = result;
|
const { latitude: lat, longitude: lon } = result;
|
||||||
const location = { lat, lon } as Location;
|
const location = { lat, lon } as Location;
|
||||||
|
|
||||||
cache.set(ip, location);
|
cache.set(ip, location);
|
||||||
|
|||||||
Reference in New Issue
Block a user