From eeac29acebe20ed7f3928ddcc7550c265877b07b Mon Sep 17 00:00:00 2001 From: root Date: Mon, 25 Nov 2019 00:22:52 +0800 Subject: [PATCH] update --- app/Http/Controllers/Server/DeepbworkController.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Server/DeepbworkController.php b/app/Http/Controllers/Server/DeepbworkController.php index b0121fff..57818341 100644 --- a/app/Http/Controllers/Server/DeepbworkController.php +++ b/app/Http/Controllers/Server/DeepbworkController.php @@ -17,10 +17,11 @@ class DeepbworkController extends Controller public function user (Request $request) { $nodeId = $request->input('node_id'); $server = Server::find($nodeId); - if ($server) { - $server->last_check_at = time(); - $server->save(); + if (!$server) { + abort(500, 'fail'); } + $server->last_check_at = time(); + $server->save(); $users = User::whereIn('group_id', json_decode($server->group_id)) ->select([ 'id',