1
0
Fork 0
mirror of synced 2024-06-01 18:39:57 +12:00

Fixed GEOIP path

This commit is contained in:
eldadfux 2019-08-03 21:55:00 +03:00
parent d8b3d28dd5
commit 5d954fe6b4
3 changed files with 5 additions and 5 deletions

View file

@ -85,7 +85,7 @@ $utopia->get('/v1/account/sessions')
->action(
function() use ($response, $user) {
$tokens = $user->getAttribute('tokens', []);
$reader = new Reader('../app/db/GeoLite2/GeoLite2-Country.mmdb');
$reader = new Reader(__DIR__ . '/../app/db/GeoLite2/GeoLite2-Country.mmdb');
$sessions = [];
$current = Auth::tokenVerify($tokens, Auth::TOKEN_TYPE_LOGIN, Auth::$secret);
$index = 0;
@ -165,7 +165,7 @@ $utopia->get('/v1/account/security')
'account.update.password',
]);
$reader = new Reader('../app/db/GeoLite2/GeoLite2-Country.mmdb');
$reader = new Reader(__DIR__ . '/../app/db/GeoLite2/GeoLite2-Country.mmdb');
$output = [];
foreach($logs as $i => &$log) {

View file

@ -17,7 +17,7 @@ $utopia->get('/v1/locale')
{
$eu = include __DIR__ . '/../config/eu.php';
$currencies = include __DIR__ . '/../config/currencies.php';
$reader = new Reader('../app/db/GeoLite2/GeoLite2-Country.mmdb');
$reader = new Reader(__DIR__ . '/../app/db/GeoLite2/GeoLite2-Country.mmdb');
$output = [];
$ip = $request->getIP();
$time = (60 * 60 * 24 * 45); // 45 days cache

View file

@ -170,7 +170,7 @@ $utopia->get('/v1/users/:userId/sessions')
}
$tokens = $user->getAttribute('tokens', []);
$reader = new Reader('../app/db/GeoLite2/GeoLite2-Country.mmdb');
$reader = new Reader(__DIR__ . '/../app/db/GeoLite2/GeoLite2-Country.mmdb');
$sessions = [];
$index = 0;
$countries = Locale::getText('countries');
@ -239,7 +239,7 @@ $utopia->get('/v1/users/:userId/logs')
$logs = $au->getLogsByUser($user->getUid(), $user->getAttribute('type', 0));
$reader = new Reader('../app/db/GeoLite2/GeoLite2-Country.mmdb');
$reader = new Reader(__DIR__ . '/../app/db/GeoLite2/GeoLite2-Country.mmdb');
$output = [];
foreach($logs as $i => &$log) {