This commit is contained in:
Andras Bacsai
2023-06-19 15:43:53 +02:00
parent bb3a1d2f16
commit 8910d5a65d
4 changed files with 33 additions and 25 deletions

View File

@@ -44,9 +44,15 @@ function getRouteParameters()
function get_latest_version_of_coolify()
{
$response = Http::get('https://cdn.coollabs.io/coolify/versions.json');
$versions = $response->json();
return data_get($versions, 'coolify.v4.version');
try {
$response = Http::get('https://cdn.coollabs.io/coolify/versions.json');
$versions = $response->json();
return data_get($versions, 'coolify.v4.version');
} catch (\Throwable $th) {
//throw $th;
ray($th->getMessage());
return '0.0.0';
}
}
function generate_random_name()