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

This commit is contained in:
lukibeg 2025-10-22 22:49:03 -03:00
parent ebf24caf3c
commit 1eeff13eeb
1 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ 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']));
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']), JSON_UNESCAPED_UNICODE);
}
try {
@ -43,7 +43,7 @@ class ReportController
return new Response(
500,
['Content-Type' => 'application/json'],
json_encode(['error' => 'Erro ao executar a consulta: ' . $e->getMessage()])
json_encode(['error' => 'Erro ao executar a consulta: ' . $e->getMessage()], JSON_UNESCAPED_UNICODE)
);
}
}