修改 删除逻辑
This commit is contained in:
parent
693f9ab3ea
commit
3e9f23fe65
@ -44,6 +44,11 @@ public function update(Request $request, Host $host)
|
|||||||
public function destroy(Host $host)
|
public function destroy(Host $host)
|
||||||
{
|
{
|
||||||
if ($host->user_id == auth()->id()) {
|
if ($host->user_id == auth()->id()) {
|
||||||
|
|
||||||
|
if ($host->status == 'pending') {
|
||||||
|
return $this->error('主机正在创建中,无法删除');
|
||||||
|
}
|
||||||
|
|
||||||
dispatch(new \App\Jobs\Remote\Host($host, 'delete'));
|
dispatch(new \App\Jobs\Remote\Host($host, 'delete'));
|
||||||
} else {
|
} else {
|
||||||
return $this->error('无权操作');
|
return $this->error('无权操作');
|
||||||
|
Loading…
Reference in New Issue
Block a user