fix(resources): clarify build server hosting restrictions (#10961)

This commit is contained in:
Andras Bacsai
2026-07-16 21:35:23 +02:00
committed by GitHub
parent 7d699818e8
commit 913d033c75
25 changed files with 621 additions and 70 deletions
@@ -1813,6 +1813,12 @@ class DatabasesController extends Controller
if (! $server) {
return response()->json(['message' => 'Server not found.'], 404);
}
if (! $server->canHostResources()) {
return response()->json([
'message' => 'Validation failed.',
'errors' => ['server_uuid' => ['The specified server is configured as a build server and cannot host resources.']],
], 422);
}
$destinations = $server->destinations();
if ($destinations->count() == 0) {
return response()->json(['message' => 'Server has no destinations.'], 400);