Files
c-cms-legacy/app/Http/helpers.php
TheGamecraft f98cd85872 ALPHA 3.0.6h
2018-11-27 17:17:52 -05:00

19 lines
405 B
PHP

<?php
function getStatus()
{
$client = new GuzzleHttp\Client();
$incidents = $client->get('https://status.exvps.ca/api/v1/incidents');
$isBroken = false;
$incidents_decode = json_decode($incidents->getBody(),true);
foreach ($incidents_decode['data'] as $incident) {
if (!$incident['is_resolved']) {
$isBroken = true;
}
}
return $isBroken;
}