diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-06-25 14:14:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-25 14:14:11 +0200 |
commit | e5245da74aa1cd314c81309e9a82ca9565de54a0 (patch) | |
tree | 918a6a518d3717fe52cd1375147624911310231b /apps/weather_status | |
parent | 31663ac56efd69cf18b0136c644432964c08cb10 (diff) | |
parent | 0519bc0726df627707ca7efa844070ede4b8e033 (diff) | |
download | nextcloud-server-e5245da74aa1cd314c81309e9a82ca9565de54a0.tar.gz nextcloud-server-e5245da74aa1cd314c81309e9a82ca9565de54a0.zip |
Merge pull request #38665 from nextcloud/fix/weather_status-osm-api
fix(weather_status): Pass address as param to OSM API
Diffstat (limited to 'apps/weather_status')
-rw-r--r-- | apps/weather_status/lib/Service/WeatherStatusService.php | 5 |
1 files changed, 3 insertions, 2 deletions
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 <eneiluj@posteo.net> * @author Roeland Jago Douma <roeland@famdouma.nl> * - * @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]; |