mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
fix(weather_status): Pass address as param
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
d80277c340
commit
0519bc0726
1 changed files with 3 additions and 2 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Reference in a new issue