Fix location

This commit is contained in:
maciejhirsz
2018-07-16 11:13:22 +02:00
parent 43a87deb9c
commit f6fabfe340
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -6,8 +6,8 @@ declare module 'iplocation' {
country?: string;
countryCode?: string;
isp?: string;
lat: number;
lon: number;
latitude: number;
longitude: number;
org?: string;
query?: string;
region?: string;
+1 -1
View File
@@ -30,7 +30,7 @@ export async function locate(ip: string): Promise<Maybe<Location>> {
return resolve(null);
}
const { lat, lon } = result;
const { latitude: lat, longitude: lon } = result;
const location = { lat, lon } as Location;
cache.set(ip, location);