diff --git a/app/Http/Controllers/Admin/Server/TrojanController.php b/app/Http/Controllers/Admin/Server/TrojanController.php index e6d5a1a4..d3dae5c5 100644 --- a/app/Http/Controllers/Admin/Server/TrojanController.php +++ b/app/Http/Controllers/Admin/Server/TrojanController.php @@ -23,7 +23,11 @@ class TrojanController extends Controller } $server[$i]['group_id'] = json_decode($server[$i]['group_id']); $server[$i]['online'] = Cache::get(CacheKey::get('SERVER_TROJAN_ONLINE_USER', $server[$i]['id'])); - $server[$i]['last_check_at'] = Cache::get(CacheKey::get('SERVER_TROJAN_LAST_CHECK_AT', $server[$i]['id'])); + if ($server[$i]['parent_id']) { + $server[$i]['last_check_at'] = Cache::get(CacheKey::get('SERVER_TROJAN_LAST_CHECK_AT', $server[$i]['parent_id'])); + } else { + $server[$i]['last_check_at'] = Cache::get(CacheKey::get('SERVER_TROJAN_LAST_CHECK_AT', $server[$i]['id'])); + } } return response([ 'data' => $server