mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
remove audits deletion
This commit is contained in:
@@ -3733,10 +3733,6 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu
|
||||
)
|
||||
);
|
||||
|
||||
$queueForDeletes
|
||||
->setType(DELETE_TYPE_AUDIT)
|
||||
->setDocument($document);
|
||||
|
||||
$queueForEvents
|
||||
->setParam('databaseId', $databaseId)
|
||||
->setParam('collectionId', $collection->getId())
|
||||
|
||||
@@ -492,8 +492,6 @@ class Databases extends Action
|
||||
});
|
||||
|
||||
$dbForProject->deleteCollection('database_' . $database->getInternalId());
|
||||
|
||||
$this->deleteAuditLogsByResource('database/' . $database->getId(), $project, $dbForProject);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -549,23 +547,8 @@ class Databases extends Action
|
||||
Query::equal('databaseInternalId', [$databaseInternalId]),
|
||||
Query::equal('collectionInternalId', [$collectionInternalId])
|
||||
], $dbForProject);
|
||||
|
||||
$this->deleteAuditLogsByResource('database/' . $databaseId . '/collection/' . $collectionId, $project, $dbForProject);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $resource
|
||||
* @param Document $project
|
||||
* @param Database $dbForProject
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function deleteAuditLogsByResource(string $resource, Document $project, Database $dbForProject): void
|
||||
{
|
||||
$this->deleteByGroup(Audit::COLLECTION, [
|
||||
Query::equal('resource', [$resource])
|
||||
], $dbForProject);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $collection collectionID
|
||||
|
||||
Reference in New Issue
Block a user