minor changes to history api
This commit is contained in:
@@ -12,18 +12,18 @@ use App\Libs\Attributes\Route\Route;
|
||||
use App\Libs\Container;
|
||||
use App\Libs\DataUtil;
|
||||
use App\Libs\Entity\StateInterface as iState;
|
||||
use App\Libs\Exceptions\RuntimeException;
|
||||
use App\Libs\Enums\Http\Status;
|
||||
use App\Libs\Guid;
|
||||
use App\Libs\Mappers\ExtendedImportInterface as iEImport;
|
||||
use App\Libs\Mappers\Import\DirectMapper;
|
||||
use App\Libs\Traits\APITraits;
|
||||
use JsonException;
|
||||
use Psr\Http\Message\ResponseInterface as iResponse;
|
||||
use Psr\Http\Message\ServerRequestInterface as iRequest;
|
||||
use Psr\Log\LoggerInterface as iLogger;
|
||||
use RuntimeException;
|
||||
use SplFileInfo;
|
||||
use Throwable;
|
||||
use JsonException;
|
||||
|
||||
final class Index
|
||||
{
|
||||
@@ -49,10 +49,10 @@ final class Index
|
||||
public const string URL = '%{api.prefix}/history';
|
||||
|
||||
public function __construct(
|
||||
#[Inject(DirectMapper::class)] private iEImport $mapper,
|
||||
#[Inject(DirectMapper::class)]
|
||||
private iEImport $mapper,
|
||||
private iLogger $logger
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
#[Get(self::URL . '[/]', name: 'history.list')]
|
||||
public function list(iRequest $request): iResponse
|
||||
@@ -305,9 +305,9 @@ final class Index
|
||||
}
|
||||
|
||||
if (null === ($matches['field'] ?? null) || false === in_array(
|
||||
$matches['field'],
|
||||
self::COLUMNS_SORTABLE
|
||||
)) {
|
||||
$matches['field'],
|
||||
self::COLUMNS_SORTABLE
|
||||
)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -502,7 +502,7 @@ final class Index
|
||||
|
||||
try {
|
||||
$data = ffprobe_file($file, $userContext->cache);
|
||||
} catch (RuntimeException|JsonException) {
|
||||
} catch (RuntimeException | JsonException) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user