Fix issue with country db.

This commit is contained in:
Mike Cao 2021-07-16 09:23:55 -07:00
parent 25085cbe10
commit 526ed01d0a

View File

@ -64,7 +64,7 @@ export async function getCountry(req, ip) {
// Database lookup
if (!lookup) {
lookup = await maxmind.open(path.resolve('./public/geo/GeoLite2-Country.mmdb'));
lookup = await maxmind.open(path.resolve(__dirname, '../public/geo/GeoLite2-Country.mmdb'));
}
const result = lookup.get(ip);