mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
fix: revert some more for less confusion
This commit is contained in:
parent
5187324b03
commit
3130b44340
1 changed files with 7 additions and 9 deletions
|
|
@ -55,19 +55,17 @@ class DockerImage extends Component
|
|||
'latest';
|
||||
|
||||
$destination_uuid = $this->query['destination'];
|
||||
$destination = StandaloneDocker::where('uuid', $destination_uuid)->first()
|
||||
?? SwarmDocker::where('uuid', $destination_uuid)->first();
|
||||
|
||||
if (!$destination) {
|
||||
throw new \Exception('Destination not found.');
|
||||
$destination = StandaloneDocker::where('uuid', $destination_uuid)->first();
|
||||
if (! $destination) {
|
||||
$destination = SwarmDocker::where('uuid', $destination_uuid)->first();
|
||||
}
|
||||
if (! $destination) {
|
||||
throw new \Exception('Destination not found. What?!');
|
||||
}
|
||||
$destination_class = $destination->getMorphClass();
|
||||
|
||||
$project = Project::where('uuid', $this->parameters['project_uuid'])->first();
|
||||
$environment = $project->load(['environments'])
|
||||
->environments
|
||||
->where('name', $this->parameters['environment_name'])
|
||||
->first();
|
||||
$environment = $project->load(['environments'])->environments->where('name', $this->parameters['environment_name'])->first();
|
||||
|
||||
$application = Application::create([
|
||||
'name' => 'docker-image-'.new Cuid2,
|
||||
|
|
|
|||
Loading…
Reference in a new issue