This commit is contained in:
Hamza-Ayed
2026-04-30 18:36:10 +03:00
parent e999cd4ffa
commit 0c6a4f9491

View File

@@ -11,7 +11,8 @@ require_once __DIR__ . '/../../core/bootstrap.php';
use Firebase\JWT\JWT;
// التحقق من الجلسة الحالية للأدمن
$admin = authenticateJWT();
$jwtService = new JwtService($redis ?? null);
$admin = $jwtService->authenticate();
if ($admin->role !== 'admin') {
jsonError("Unauthorized. Admin access required.");