mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix bulk logged queries
This commit is contained in:
+3
-1
@@ -104,6 +104,8 @@ class Delete extends Action
|
||||
throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Bulk delete is not supported for ' . $this->getSdkNamespace() . ' with relationship attributes');
|
||||
}
|
||||
|
||||
$originalQueries = $queries;
|
||||
|
||||
try {
|
||||
$queries = Query::parseQueries($queries);
|
||||
} catch (QueryException $e) {
|
||||
@@ -135,7 +137,7 @@ class Delete extends Action
|
||||
'transactionInternalId' => $transaction->getSequence(),
|
||||
'action' => 'bulkDelete',
|
||||
'data' => [
|
||||
'queries' => $queries,
|
||||
'queries' => $originalQueries,
|
||||
],
|
||||
]);
|
||||
|
||||
|
||||
+4
-3
@@ -116,13 +116,15 @@ class Update extends Action
|
||||
throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Bulk update is not supported for ' . $this->getSdkNamespace() . ' with relationship attributes');
|
||||
}
|
||||
|
||||
$originalQueries = $queries;
|
||||
|
||||
try {
|
||||
$queries = Query::parseQueries($queries);
|
||||
} catch (QueryException $e) {
|
||||
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
|
||||
}
|
||||
|
||||
if ($data['$permissions']) {
|
||||
if (isset($data['$permissions'])) {
|
||||
$validator = new Permissions();
|
||||
if (!$validator->isValid($data['$permissions'])) {
|
||||
throw new Exception(Exception::GENERAL_BAD_REQUEST, $validator->getDescription());
|
||||
@@ -157,7 +159,7 @@ class Update extends Action
|
||||
'action' => 'bulkUpdate',
|
||||
'data' => [
|
||||
'data' => $data,
|
||||
'queries' => $queries,
|
||||
'queries' => $originalQueries,
|
||||
],
|
||||
]);
|
||||
|
||||
@@ -167,7 +169,6 @@ class Update extends Action
|
||||
'transactions',
|
||||
$transactionId,
|
||||
'operations',
|
||||
1
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user