mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-06 02:16:09 +00:00
Merge remote-tracking branch 'origin/next' into audit-policies
This commit is contained in:
commit
f83c71fd4f
6 files changed
+41
-7
No files matched your search
@@ -1099,6 +1099,17 @@ class ApplicationsController extends Controller
|
||||
return response()->json(['message' => 'Server has multiple destinations and you do not set destination_uuid.'], 400);
|
||||
}
|
||||
$destination = $destinations->first();
|
||||
if ($destinations->count() > 1 && $request->has('destination_uuid')) {
|
||||
$destination = $destinations->where('uuid', $request->destination_uuid)->first();
|
||||
if (! $destination) {
|
||||
return response()->json([
|
||||
'message' => 'Validation failed.',
|
||||
'errors' => [
|
||||
'destination_uuid' => 'Provided destination_uuid does not belong to the specified server.',
|
||||
],
|
||||
], 422);
|
||||
}
|
||||
}
|
||||
if ($type === 'public') {
|
||||
$validationRules = [
|
||||
'git_repository' => ['string', 'required', new ValidGitRepositoryUrl],
|
||||
|
||||
Reference in new issue
Block a user