mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix geoRecord/getGeoForIp registration to use $context
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
2e7beb6977
commit
ed68e1ed8a
@@ -1437,7 +1437,7 @@ return function (Container $context): void {
|
||||
return new Agent($adapter);
|
||||
}, ['register']);
|
||||
|
||||
$container->set('geoRecord', function ($request, callable $getGeoForIp) {
|
||||
$context->set('geoRecord', function ($request, callable $getGeoForIp) {
|
||||
$ip = $request->getIp();
|
||||
|
||||
if (!filter_var($ip, FILTER_VALIDATE_IP)) {
|
||||
@@ -1448,7 +1448,7 @@ return function (Container $context): void {
|
||||
return $getGeoForIp($ip);
|
||||
}, ['request', 'getGeoForIp']);
|
||||
|
||||
$container->set('getGeoForIp', function (Locale $locale) {
|
||||
$context->set('getGeoForIp', function (Locale $locale) {
|
||||
$cache = [];
|
||||
|
||||
return function (string $ip) use ($locale, &$cache): GeoRecord {
|
||||
|
||||
Reference in New Issue
Block a user