This commit is contained in:
root 2019-11-25 00:22:52 +08:00
parent 37e35056ff
commit eeac29aceb

View File

@ -17,10 +17,11 @@ class DeepbworkController extends Controller
public function user (Request $request) { public function user (Request $request) {
$nodeId = $request->input('node_id'); $nodeId = $request->input('node_id');
$server = Server::find($nodeId); $server = Server::find($nodeId);
if ($server) { if (!$server) {
$server->last_check_at = time(); abort(500, 'fail');
$server->save();
} }
$server->last_check_at = time();
$server->save();
$users = User::whereIn('group_id', json_decode($server->group_id)) $users = User::whereIn('group_id', json_decode($server->group_id))
->select([ ->select([
'id', 'id',