Poprawka botto bar i wersje językowe
This commit is contained in:
@@ -19,14 +19,17 @@ function resolveGuestQueueTableId(string $tableId, string $qrHash): string
|
||||
{
|
||||
global $conn;
|
||||
|
||||
if ($tableId === '' && $qrHash !== '' && isset($conn)) {
|
||||
$resolved = getTableNameByHash($conn, $qrHash);
|
||||
if ($resolved !== '') {
|
||||
$tableId = $resolved;
|
||||
}
|
||||
// Wymagamy prawidłowego hasha QR — samo tableId (łatwe do odgadnięcia) nie wystarczy.
|
||||
if ($qrHash === '' || !isset($conn)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return trim($tableId);
|
||||
$resolved = getTableNameByHash($conn, $qrHash);
|
||||
if ($resolved === '') {
|
||||
return '';
|
||||
}
|
||||
|
||||
return trim($resolved);
|
||||
}
|
||||
|
||||
function hasPendingGuestAction(PDO $pdo, string $tableId, string $messageType): bool
|
||||
@@ -285,7 +288,7 @@ if ($tableId === '') {
|
||||
http_response_code(422);
|
||||
echo json_encode([
|
||||
'status' => 'error',
|
||||
'message' => 'tableId is required',
|
||||
'message' => 'Valid qrHash is required',
|
||||
], JSON_UNESCAPED_UNICODE);
|
||||
exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user