audit log
This commit is contained in:
@@ -115,6 +115,30 @@ class Stream
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws BadRequest
|
||||
* @throws Forbidden
|
||||
* @throws NotFound
|
||||
*/
|
||||
public function getActionListUpdates(Request $request): stdClass
|
||||
{
|
||||
$id = $request->getRouteParam('id');
|
||||
$scope = $request->getRouteParam('scope');
|
||||
|
||||
if ($scope === null || $id === null) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$searchParams = $this->fetchSearchParams($request);
|
||||
|
||||
$result = $this->service->findUpdates($scope, $id, $searchParams);
|
||||
|
||||
return (object) [
|
||||
'total' => $result->getTotal(),
|
||||
'list' => $result->getValueMapList(),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws BadRequest
|
||||
* @throws Forbidden
|
||||
@@ -146,6 +170,20 @@ class Stream
|
||||
$searchParams = $searchParams->withBoolFilterAdded('skipOwn');
|
||||
}
|
||||
|
||||
$beforeNumber = $request->getQueryParam('beforeNumber');
|
||||
|
||||
if ($beforeNumber) {
|
||||
$searchParams = $searchParams
|
||||
->withWhereAdded(
|
||||
WhereItem
|
||||
::createBuilder()
|
||||
->setAttribute('number')
|
||||
->setType(WhereItem\Type::LESS_THAN)
|
||||
->setValue($beforeNumber)
|
||||
->build()
|
||||
);
|
||||
}
|
||||
|
||||
return $searchParams;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user