fix: delete event to deleting

This commit is contained in:
Andras Bacsai 2023-10-05 08:46:26 +02:00
parent 1c8f92d3b7
commit 91db1953ff
3 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ protected static function booted()
'project_id' => $project->id,
]);
});
static::deleted(function ($project) {
static::deleting(function ($project) {
$project->environments()->delete();
$project->settings()->delete();
});

View File

@ -16,7 +16,7 @@ class Service extends BaseModel
protected static function booted()
{
static::deleted(function ($service) {
static::deleting(function ($service) {
$storagesToDelete = collect([]);
foreach ($service->applications()->get() as $application) {
instant_remote_process(["docker rm -f {$application->name}-{$service->uuid}"], $service->server, false);

View File

@ -28,7 +28,7 @@ protected static function booted()
'is_readonly' => true
]);
});
static::deleted(function ($database) {
static::deleting(function ($database) {
// Stop Container
instant_remote_process(
["docker rm -f {$database->uuid}"],