mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge pull request #10279 from appwrite/fix-document-audit-resource-path
Fix: wrong resource path for audits
This commit is contained in:
+6
-2
@@ -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 = [];
|
||||
|
||||
Reference in New Issue
Block a user