Browse Source

formatting

Henry Whitaker 2 years ago
parent
commit
d7c1e2b8ac
1 changed files with 6 additions and 5 deletions
  1. 6 5
      api/homepage/uptime_kuma.php

+ 6 - 5
api/homepage/uptime_kuma.php

@@ -84,11 +84,12 @@ trait UptimeKumaHomepageItem
 		$api = [];
 		$url = $this->qualifyURL($this->config['uptimeKumaURL']);
 		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 = [
 				'data' => $metrics->getMonitors(),