diff --git a/app/controllers/api/health.php b/app/controllers/api/health.php index 38a2faa754..1c5b68e9c3 100644 --- a/app/controllers/api/health.php +++ b/app/controllers/api/health.php @@ -748,7 +748,7 @@ App::get('/v1/health/queue/failed/:name') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'health') ->label('sdk.method', 'getFailedJobs') - ->param('queueName', '', new WhiteList([ + ->param('name', '', new WhiteList([ Event::DATABASE_QUEUE_NAME, Event::DELETE_QUEUE_NAME, Event::AUDITS_QUEUE_NAME, diff --git a/src/Appwrite/Platform/Workers/Deletes.php b/src/Appwrite/Platform/Workers/Deletes.php index b5b2d82025..96cb2d80cf 100644 --- a/src/Appwrite/Platform/Workers/Deletes.php +++ b/src/Appwrite/Platform/Workers/Deletes.php @@ -516,8 +516,8 @@ class Deletes extends Action if ($document->getAttribute('confirm')) { // Count only confirmed members $teamId = $document->getAttribute('teamId'); $team = $dbForProject->getDocument('teams', $teamId); - if (!$team->isEmpty() && $team->getAttribute('total', 0) > 0) { - $dbForProject->decreaseDocumentAttribute('teams', $teamId, 'total', 1); + if (!$team->isEmpty()) { + $dbForProject->decreaseDocumentAttribute('teams', $teamId, 'total', 1, 0); } } });