Henry Whitaker hace 3 años
padre
commit
d7c1e2b8ac
Se han modificado 1 ficheros con 6 adiciones y 5 borrados
  1. 6 5
      api/homepage/uptime_kuma.php

+ 6 - 5
api/homepage/uptime_kuma.php

@@ -84,11 +84,12 @@ trait UptimeKumaHomepageItem
 		$api = [];
 		$api = [];
 		$url = $this->qualifyURL($this->config['uptimeKumaURL']);
 		$url = $this->qualifyURL($this->config['uptimeKumaURL']);
 		try {
 		try {
-			$response = $this->getKumaClient($url, $this->config['uptimeKumaToken'])->get('/metrics');
-
-			$body = $response->getBody()->getContents();
-
-			$metrics = (new UptimeKumaMetrics($body))->process();
+			$metrics = (new UptimeKumaMetrics(
+				$this->getKumaClient($url, $this->config['uptimeKumaToken'])
+				->get('/metrics')
+				->getBody()
+				->getContents()
+			))->process();
 
 
 			$api = [
 			$api = [
 				'data' => $metrics->getMonitors(),
 				'data' => $metrics->getMonitors(),