This commit is contained in:
2026-01-23 23:45:16 +01:00
parent 0a784ef454
commit ed5d77bf6c
4 changed files with 23 additions and 10 deletions

View File

@@ -2,5 +2,6 @@
// public/api/printers.php
header('Content-Type: application/json; charset=utf-8');
require __DIR__ . '/_db.php';
$stmt = $pdo->query("SELECT * FROM printers WHERE is_active = 1 ORDER BY name");
echo json_encode($stmt->fetchAll(), JSON_UNESCAPED_UNICODE);
require_once __DIR__ . '/../../tools/printers.php';
$printers = tools_fetch_active_printers($pdo);
echo json_encode($printers, JSON_UNESCAPED_UNICODE);