mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Use new geo folder.
This commit is contained in:
parent
23d02e5aac
commit
05933ff1d2
3 changed files with 12 additions and 9 deletions
|
|
@ -63,7 +63,9 @@ export async function getLocation(ip) {
|
|||
|
||||
// Database lookup
|
||||
if (!lookup) {
|
||||
lookup = await maxmind.open(path.resolve('node_modules/.geo/GeoLite2-Country.mmdb'));
|
||||
const dir = path.join(process.cwd(), 'geo');
|
||||
|
||||
lookup = await maxmind.open(path.resolve(dir, 'GeoLite2-City.mmdb'));
|
||||
}
|
||||
|
||||
const result = lookup.get(ip);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue