UPDATE: New business rule, if query param 'data' not sending, return json_encode error.
This commit is contained in:
parent
493220e447
commit
ebf24caf3c
|
|
@ -20,6 +20,10 @@ class ReportController
|
||||||
{
|
{
|
||||||
$connection = $this->reportsModel->dbConnect();
|
$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 {
|
try {
|
||||||
$sql = 'SELECT * FROM queue_stats_mv WHERE datetime LIKE :receivedDate';
|
$sql = 'SELECT * FROM queue_stats_mv WHERE datetime LIKE :receivedDate';
|
||||||
$stmt = $connection->prepare($sql);
|
$stmt = $connection->prepare($sql);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue