Fix sort params

This commit is contained in:
James Cole
2024-08-03 06:18:46 +02:00
parent b213148ae8
commit ff80cedd6b
6 changed files with 40 additions and 19 deletions

View File

@@ -23,12 +23,14 @@ declare(strict_types=1);
namespace FireflyIII\Support\JsonApi;
use Illuminate\Support\Facades\Log;
use LaravelJsonApi\Core\Query\SortFields;
trait ValidateSortParameters
{
public function needsFullDataset(string $class, ?SortFields $params): bool
{
Log::debug(__METHOD__);
if (null === $params) {
return false;
}
@@ -37,6 +39,7 @@ trait ValidateSortParameters
foreach ($params->all() as $field) {
if (in_array($field->name(), $config, true)) {
Log::debug('TRUE');
return true;
}
}