feat: Add Cortex XDR integration with data fetching and summary generation.
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
|
||||
|
||||
use App\Services\CortexXdrService;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
|
||||
class CortexXdrController extends Controller
|
||||
{
|
||||
@@ -23,7 +24,9 @@ class CortexXdrController extends Controller
|
||||
public function getData(CortexXdrService $cortexService)
|
||||
{
|
||||
try {
|
||||
$summary = $cortexService->getSummary();
|
||||
$summary = Cache::remember('cortex_summary_data', 300, function () use ($cortexService) {
|
||||
return $cortexService->getSummary();
|
||||
});
|
||||
return response()->json($summary);
|
||||
} catch (\Exception $e) {
|
||||
return response()->json(['error' => $e->getMessage()], 500);
|
||||
|
||||
Reference in New Issue
Block a user