@@ -4,7 +4,6 @@ namespace App\Livewire\Project\Application;
|
||||
|
||||
use App\Models\Application;
|
||||
use Livewire\Component;
|
||||
use Throwable;
|
||||
use Visus\Cuid2\Cuid2;
|
||||
|
||||
class Rollback extends Component
|
||||
@@ -24,11 +23,11 @@ class Rollback extends Component
|
||||
|
||||
public function rollbackImage($commit)
|
||||
{
|
||||
$cuid2 = new Cuid2;
|
||||
$deployment_uuid = new Cuid2;
|
||||
|
||||
queue_application_deployment(
|
||||
application: $this->application,
|
||||
deployment_uuid: $cuid2,
|
||||
deployment_uuid: $deployment_uuid,
|
||||
commit: $commit,
|
||||
rollback: true,
|
||||
force_rebuild: false,
|
||||
@@ -37,7 +36,7 @@ class Rollback extends Component
|
||||
return redirect()->route('project.application.deployment.show', [
|
||||
'project_uuid' => $this->parameters['project_uuid'],
|
||||
'application_uuid' => $this->parameters['application_uuid'],
|
||||
'deployment_uuid' => $cuid2,
|
||||
'deployment_uuid' => $deployment_uuid,
|
||||
'environment_uuid' => $this->parameters['environment_uuid'],
|
||||
]);
|
||||
}
|
||||
@@ -74,7 +73,7 @@ class Rollback extends Component
|
||||
$showToast && $this->dispatch('success', 'Images loaded.');
|
||||
|
||||
return [];
|
||||
} catch (Throwable $e) {
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user