Skip to content

Commit ec163d5

Browse files
committed
Fix incorrect config name call
1 parent ed6d365 commit ec163d5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Services/IPAddressDriver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ public function __construct(
2121

2222
public function handle(): void
2323
{
24-
$endpoint = config('security-notifications.ip_api_key')
24+
$endpoint = config('security-notifications.ip-api-key')
2525
? 'https://pro.ip-api.com/json/'
2626
: 'https://ip-api.com/json/';
2727

2828
$ipLocationData = Http::retry(3)
29-
->withQueryParameters(['key' => config('security-notifications.ip_api_key')])
29+
->withQueryParameters(['key' => config('security-notifications.ip-api-key')])
3030
->get($endpoint.$this->ipAddress)
3131
?->json();
3232

tests/Unit/IPAddressHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@
274274
it('uses pro endpoint if api key is set', function () {
275275
Bus::fake();
276276

277-
Config::set('security-notifications.ip_api_key', 'test-key');
277+
Config::set('security-notifications.ip-api-key', 'test-key');
278278

279279
$user = User::factory()->create();
280280

0 commit comments

Comments
 (0)