@@ -16,7 +16,9 @@ final class PrivateAuditController extends Controller
|
||||
{
|
||||
$scope = $access->current($this->staffIdentity($request));
|
||||
$request->validate(['page' => 'nullable|integer|min:1|max:1000000']);
|
||||
$exports = PrivateAuditExport::query()->where('created_by', $scope['actor']->id)->where('work_context', $scope['context'])->latest('id')->paginate(20)
|
||||
$legacyIds = $access->legacyExportIds($scope['actor'], $scope['context']);
|
||||
$exports = PrivateAuditExport::query()->where('created_by', $scope['actor']->id)
|
||||
->where(fn ($query) => $query->where('work_context', $scope['context'])->orWhereIn('id', $legacyIds))->latest('id')->paginate(20)
|
||||
->through(fn (PrivateAuditExport $export) => ['id' => $export->id, 'families' => $export->families,
|
||||
'created_at' => $export->created_at, 'size' => $export->size, 'sha256' => $export->sha256,
|
||||
'download_url' => '/auditoria/privada/'.$export->id.'/download']);
|
||||
|
||||
Reference in New Issue
Block a user