改进 删除
This commit is contained in:
parent
612a1c471e
commit
693f9ab3ea
@ -58,10 +58,15 @@ public function handle()
|
||||
case 'delete':
|
||||
$response = $http->delete('hosts/' . $host->id);
|
||||
|
||||
if ($response->status() === 404) {
|
||||
// if successful
|
||||
if ($response->successful()) {
|
||||
$host->delete();
|
||||
}
|
||||
|
||||
// if ($response->status() === 404) {
|
||||
// $host->delete();
|
||||
// }
|
||||
|
||||
return 0;
|
||||
// if response code is 404
|
||||
// if ($response->successful() || $response->failed()) {
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Log;
|
||||
use App\Models\Module\Module;
|
||||
use App\Exceptions\CommonException;
|
||||
use App\Models\WorkOrder\WorkOrder;
|
||||
|
Loading…
Reference in New Issue
Block a user