mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 17:08:45 +00:00
Merge branch 'feat-create-function-abuse-fix' of github.com:appwrite/appwrite into feat-create-function-abuse-fix
This commit is contained in:
commit
fcd991fff2
2 changed files with 4 additions and 6 deletions
|
|
@ -60,12 +60,13 @@ class Usage extends Action
|
|||
}
|
||||
|
||||
$document = $payload['project'] ?? [];
|
||||
$project = new Document($document);
|
||||
|
||||
if (empty($document)) {
|
||||
if (empty($project->getAttribute('database'))) {
|
||||
var_dump($payload);
|
||||
return;
|
||||
}
|
||||
|
||||
$project = new Document($document);
|
||||
$projectId = $project->getInternalId();
|
||||
foreach ($payload['reduce'] ?? [] as $document) {
|
||||
if (empty($document)) {
|
||||
|
|
@ -80,6 +81,7 @@ class Usage extends Action
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
$this->stats[$projectId]['project'] = [
|
||||
'$id' => $project->getId(),
|
||||
'$internalId' => $project->getInternalId(),
|
||||
|
|
|
|||
|
|
@ -71,10 +71,6 @@ class UsageDump extends Action
|
|||
|
||||
$project = new Document($document);
|
||||
|
||||
if (empty($project->getAttribute('database'))) {
|
||||
var_dump($stats);
|
||||
}
|
||||
|
||||
/**
|
||||
* End temp bug fallback
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue