mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Merge pull request #9101 from appwrite/fix-usage-payload-bug
Usage payload debug
This commit is contained in:
commit
796b06fec5
1 changed files with 8 additions and 2 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(1);
|
||||
var_dump($payload);
|
||||
}
|
||||
|
||||
$project = new Document($document);
|
||||
$projectId = $project->getInternalId();
|
||||
foreach ($payload['reduce'] ?? [] as $document) {
|
||||
if (empty($document)) {
|
||||
|
|
@ -80,6 +81,11 @@ class Usage extends Action
|
|||
);
|
||||
}
|
||||
|
||||
if (empty($project->getAttribute('database'))) {
|
||||
var_dump(2);
|
||||
var_dump($payload);
|
||||
}
|
||||
|
||||
$this->stats[$projectId]['project'] = [
|
||||
'$id' => $project->getId(),
|
||||
'$internalId' => $project->getInternalId(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue