From 61f70340ecd25f18935d8ff2c258f4d42256e760 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Tue, 6 Jun 2023 12:41:57 +0200 Subject: fix(weather_status): Pass address as param Signed-off-by: Ferdinand Thiessen --- apps/weather_status/lib/Service/WeatherStatusService.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apps') diff --git a/apps/weather_status/lib/Service/WeatherStatusService.php b/apps/weather_status/lib/Service/WeatherStatusService.php index 5b1d926f090..b334a5e3ba3 100644 --- a/apps/weather_status/lib/Service/WeatherStatusService.php +++ b/apps/weather_status/lib/Service/WeatherStatusService.php @@ -8,7 +8,7 @@ declare(strict_types=1); * @author Julien Veyssier * @author Roeland Jago Douma * - * @license GNU AGPL version 3 or any later version + * @license AGPL-3.0-or-later * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -310,13 +310,14 @@ class WeatherStatusService { */ private function searchForAddress(string $address): array { $params = [ + 'q' => $address, 'format' => 'json', 'addressdetails' => '1', 'extratags' => '1', 'namedetails' => '1', 'limit' => '1', ]; - $url = 'https://nominatim.openstreetmap.org/search/' . $address; + $url = 'https://nominatim.openstreetmap.org/search'; $results = $this->requestJSON($url, $params); if (count($results) > 0) { return $results[0]; -- cgit v1.2.3