<?php
header('Content-Type: application/json');
$files = glob('data/*.json');
$queue = [];

foreach ($files as $file) {
    $content = file_get_contents($file);
    $queue[] = json_decode($content, true);
}

echo json_encode(['status' => 'success', 'data' => $queue]);
?>