Merge pull request #7519 from appwrite/update-param-name

Update param name
This commit is contained in:
Christy Jacob 2024-02-08 12:55:19 +05:30 committed by GitHub
commit 243ddd4b33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -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,

View file

@ -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);
}
}
});