改进 使用 安全删除
This commit is contained in:
parent
8a003f233c
commit
3999e61a20
@ -47,12 +47,7 @@ public function destroy(HostRequest $request, Host $host): JsonResponse
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果时间大于 5 分钟,不满 1 小时
|
$host->safeDelete();
|
||||||
if (! $host->isCycle() && now()->diffInMinutes($host->updated_at) > 5 && now()->diffInMinutes($host->updated_at) < 60) {
|
|
||||||
$host->cost();
|
|
||||||
}
|
|
||||||
|
|
||||||
dispatch(new HostJob($host, 'delete'));
|
|
||||||
|
|
||||||
return $this->deleted($host);
|
return $this->deleted($host);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user