mirror of
https://github.com/myronblair/jarvis
synced 2026-06-30 17:50:23 -05:00
fix: remove missing includes/auth.php require from metrics and suggestions
Both endpoints tried to require a non-existent includes/auth.php and call AuthMiddleware::requireAuth() — auth is already handled by api.php before any endpoint file runs. This caused 500 errors on /api/metrics (which blocked agent sparklines) and /api/suggestions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
<?php
|
||||
// Agent metrics history — returns CPU/RAM samples for sparklines
|
||||
require_once __DIR__ . '/../config.php';
|
||||
require_once __DIR__ . '/../../includes/auth.php';
|
||||
header('Content-Type: application/json');
|
||||
AuthMiddleware::requireAuth();
|
||||
|
||||
$agentId = $_GET['agent_id'] ?? '';
|
||||
$hours = min((int)($_GET['hours'] ?? 2), 24);
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<?php
|
||||
// Proactive suggestions endpoint — returns time-based command suggestions
|
||||
require_once __DIR__ . '/../config.php';
|
||||
require_once __DIR__ . '/../../includes/auth.php';
|
||||
header('Content-Type: application/json');
|
||||
AuthMiddleware::requireAuth();
|
||||
|
||||
$hour = (int)date('G');
|
||||
$dow = (int)date('w'); // 0=Sun, 6=Sat
|
||||
|
||||
Reference in New Issue
Block a user