UPDATE: New business rule, if query param 'data' not sending, return json_encode error.
This commit is contained in:
parent
ebf24caf3c
commit
1eeff13eeb
|
|
@ -21,7 +21,7 @@ class ReportController
|
||||||
$connection = $this->reportsModel->dbConnect();
|
$connection = $this->reportsModel->dbConnect();
|
||||||
|
|
||||||
if (!isset($queryParams['data'])) {
|
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 {
|
try {
|
||||||
|
|
@ -43,7 +43,7 @@ class ReportController
|
||||||
return new Response(
|
return new Response(
|
||||||
500,
|
500,
|
||||||
['Content-Type' => 'application/json'],
|
['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)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue