Skip to content

Commit

Permalink
fix(weather_status): Pass address as param
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux authored and blizzz committed Jul 12, 2023
1 parent 0f19858 commit 61f7034
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/weather_status/lib/Service/WeatherStatusService.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @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
Expand Down Expand Up @@ -310,13 +310,14 @@ public function setAddress(string $address): array {
*/
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];
Expand Down

0 comments on commit 61f7034

Please sign in to comment.