mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
Merge 16938aac9e into e436eeef91
This commit is contained in:
commit
eb3dbcb7d4
1 changed files with 8 additions and 1 deletions
|
|
@ -1094,7 +1094,14 @@ class ApplicationsController extends Controller
|
||||||
if ($destinations->count() > 1 && ! $request->has('destination_uuid')) {
|
if ($destinations->count() > 1 && ! $request->has('destination_uuid')) {
|
||||||
return response()->json(['message' => 'Server has multiple destinations and you do not set destination_uuid.'], 400);
|
return response()->json(['message' => 'Server has multiple destinations and you do not set destination_uuid.'], 400);
|
||||||
}
|
}
|
||||||
$destination = $destinations->first();
|
if ($request->has('destination_uuid')) {
|
||||||
|
$destination = $destinations->where('uuid', $request->destination_uuid)->first();
|
||||||
|
if (! $destination) {
|
||||||
|
return response()->json(['message' => 'Destination not found.'], 404);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$destination = $destinations->first();
|
||||||
|
}
|
||||||
if ($type === 'public') {
|
if ($type === 'public') {
|
||||||
$validationRules = [
|
$validationRules = [
|
||||||
'git_repository' => ['string', 'required', new ValidGitRepositoryUrl],
|
'git_repository' => ['string', 'required', new ValidGitRepositoryUrl],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue