Update server and version configurations

This commit is contained in:
Andras Bacsai 2024-03-05 15:47:43 +01:00
parent fd97c5085b
commit 81512bb3b7
4 changed files with 24 additions and 21 deletions

View File

@ -19,11 +19,11 @@ public function servers(Request $request)
$server['is_usable'] = $server->settings->is_usable;
return $server;
});
ray($servers);
return response()->json($servers);
}
public function server_by_uuid(Request $request)
{
$with_resources = $request->query('resources');
$teamId = get_team_id_from_token();
if (is_null($teamId)) {
return response()->json(['error' => 'Invalid token.', 'docs' => 'https://coolify.io/docs/api/authentication'], 400);
@ -32,7 +32,7 @@ public function server_by_uuid(Request $request)
if (is_null($server)) {
return response()->json(['error' => 'Server not found.'], 404);
}
$server->load(['settings']);
if ($with_resources) {
$server['resources'] = $server->definedResources()->map(function ($resource) {
$payload = [
'id' => $resource->id,
@ -49,6 +49,9 @@ public function server_by_uuid(Request $request)
}
return $payload;
});
} else {
$server->load(['settings']);
}
return response()->json($server);
}
}

View File

@ -7,7 +7,7 @@
// The release version of your application
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
'release' => '4.0.0-beta.235',
'release' => '4.0.0-beta.236',
// When left empty or `null` the Laravel environment will be used
'environment' => config('app.env'),

View File

@ -1,3 +1,3 @@
<?php
return '4.0.0-beta.235';
return '4.0.0-beta.236';

View File

@ -4,7 +4,7 @@
"version": "3.12.36"
},
"v4": {
"version": "4.0.0-beta.235"
"version": "4.0.0-beta.236"
}
}
}