summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2023-06-06 12:41:57 +0200
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2023-08-16 16:28:17 +0000
commitf3ccb9851b2b2881853b210a3366b68668999025 (patch)
treee378c67e278bb2add22fa6a624f236a043b74d56
parent4b87cc943a97a9d62c6df5bc68a9f900e21ce4b4 (diff)
downloadnextcloud-server-f3ccb9851b2b2881853b210a3366b68668999025.tar.gz
nextcloud-server-f3ccb9851b2b2881853b210a3366b68668999025.zip
fix(weather_status): Pass address as param
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
-rw-r--r--apps/weather_status/lib/Service/WeatherStatusService.php5
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 fa3177b20f6..a233a409c74 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];