mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 16:38:32 +00:00
Merge pull request #10279 from appwrite/fix-document-audit-resource-path
Fix: wrong resource path for audits
This commit is contained in:
commit
f154b1e8aa
1 changed files with 6 additions and 2 deletions
|
|
@ -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 = [];
|
||||
|
|
|
|||
Loading…
Reference in a new issue