UPDATE: New business rule, if query param 'data' not sending, return json_encode error.

This commit is contained in:
lukibeg 2025-10-22 22:46:09 -03:00
parent 493220e447
commit ebf24caf3c
1 changed files with 4 additions and 0 deletions

View File

@ -20,6 +20,10 @@ class ReportController
{
$connection = $this->reportsModel->dbConnect();
if (!isset($queryParams['data'])) {
return new Response(403, ['Content-Type' => 'application/json'], json_encode(['error' => 'O parâmetro "data" não foi enviado corretamente, ou não existe. Tente novamente']));
}
try {
$sql = 'SELECT * FROM queue_stats_mv WHERE datetime LIKE :receivedDate';
$stmt = $connection->prepare($sql);