fix: wrong resource path.

This commit is contained in:
Darshan 2025-08-08 13:34:33 +05:30
parent 00aed7dce9
commit ad79f3dcca

View file

@ -106,8 +106,12 @@ class XList extends Action
]);
$audit = new Audit($dbForProject);
// getContext() => `document` or `row`.
$resource = 'database/' . $databaseId . '/collection/' . $collectionId . '/' .$this->getContext(). '/' . $document->getId();
// returns what we want, ignore the naming!
$type = $this->getCollectionsEventsContext();
$item = $this->getContext() === ROWS ? 'row' : 'document';
$resource = "database/$databaseId/$type/{$collectionId}/$item/{$document->getId()}";
$logs = $audit->getLogsByResource($resource, $queries);
$output = [];