mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 07:07:17 +01:00
collect pagetitle, update subdivision2 data type
This commit is contained in:
parent
55a586fe27
commit
6c302a7325
8 changed files with 3511 additions and 12 deletions
|
|
@ -69,7 +69,7 @@ export async function getLocation(ip) {
|
|||
const result = lookup.get(ip);
|
||||
const country = result?.country?.iso_code ?? result?.registered_country?.iso_code;
|
||||
const subdivision1 = result?.subdivisions[0]?.iso_code;
|
||||
const subdivision2 = result?.subdivisions[1]?.iso_code;
|
||||
const subdivision2 = result?.subdivisions[1]?.names?.en;
|
||||
const city = result?.city?.names?.en;
|
||||
|
||||
return { country, subdivision1, subdivision2, city };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue