api getQueryParam return string

This commit is contained in:
Yuri Kuznetsov
2022-03-15 14:15:41 +02:00
parent 6c89147b2c
commit 6a45db8e1c
10 changed files with 31 additions and 41 deletions
+7 -1
View File
@@ -29,6 +29,8 @@
namespace Espo\Controllers;
use Espo\Core\Exceptions\BadRequest;
use Espo\Core\{
Api\Request,
Record\SearchParamsFetcher,
@@ -97,7 +99,11 @@ class Stream
$maxSize = $searchParams->getMaxSize();
$after = $request->getQueryParam('after');
$where = $request->getQueryParam('where');
$where = $request->getQueryParams()['where'] ?? null;
if ($where !== null && !is_array($where)) {
throw new BadRequest();
}
$result = $this->service->find($scope, $id, [
'offset' => $offset,