Complete port of all 163 API endpoints from Lucee/CFML to PHP 8.3. Shared helpers in api/helpers.php (DB, auth, request/response, security). PDO prepared statements throughout. Same JSON response shapes as CFML.
22 lines
393 B
PHP
22 lines
393 B
PHP
<?php
|
|
require_once __DIR__ . '/../helpers.php';
|
|
runAuth();
|
|
|
|
$rows = queryTimed("
|
|
SELECT ID, UUID FROM BeaconShards WHERE IsActive = 1 ORDER BY ID
|
|
", []);
|
|
|
|
$items = [];
|
|
foreach ($rows as $r) {
|
|
$items[] = [
|
|
'ShardID' => (int) $r['ID'],
|
|
'UUID' => $r['UUID'],
|
|
];
|
|
}
|
|
|
|
jsonResponse([
|
|
'OK' => true,
|
|
'ERROR' => '',
|
|
'SHARDS' => $items,
|
|
'ITEMS' => $items,
|
|
]);
|