Skip to content
Snippets Groups Projects
Commit 106b1d54 authored by Tibo's avatar Tibo
Browse files

Revert proxy handling modifications

parent a809fe30
No related branches found
No related tags found
1 merge request!6Temperature
Pipeline #3303 failed
...@@ -19,20 +19,12 @@ class ClientVersion extends \App\AbstractSensor ...@@ -19,20 +19,12 @@ class ClientVersion extends \App\AbstractSensor
$options = ['timeout' => 5.0]; $options = ['timeout' => 5.0];
$proxy = config("app.proxy", null); $proxy = config("app.proxy", null);
var_dump($proxy);
//exit();
if ($proxy != null) { if ($proxy != null) {
$options["proxy"] = $proxy; $options["proxy"] = $proxy;
} }
$client = new Client($options); $client = new Client($options);
$json = $client->get(self::MANIFEST)->getBody();
try {
$json = $client->get(self::MANIFEST)->getBody();
} catch (\Exception $ex) {
return "";
}
return json_decode($json)[0]; return json_decode($json)[0];
} }
...@@ -40,14 +32,12 @@ class ClientVersion extends \App\AbstractSensor ...@@ -40,14 +32,12 @@ class ClientVersion extends \App\AbstractSensor
public function latestVersion() public function latestVersion()
{ {
//return $this->manifest()->version; return $this->manifest()->version;
return "";
} }
public function latestUrl() public function latestUrl()
{ {
//return $this->manifest()->url; return $this->manifest()->url;
return "";
} }
//put your code here //put your code here
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment