mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix(teams): added comment
This commit is contained in:
@@ -784,7 +784,7 @@ App::delete('/v1/teams/:teamId/memberships/:membershipId')
|
||||
|
||||
if ($membership->getAttribute('confirm')) { // Count only confirmed members
|
||||
$team = $projectDB->updateDocument(\array_merge($team->getArrayCopy(), [
|
||||
'sum' => \max($team->getAttribute('sum', 0) - 1, 0),
|
||||
'sum' => \max($team->getAttribute('sum', 0) - 1, 0), // Ensure that sum is always >= 0
|
||||
]));
|
||||
}
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ class DeletesV1
|
||||
$team = $this->getProjectDB($projectId)->getDocument($teamId);
|
||||
if(!$team->isEmpty()) {
|
||||
$team = $this->getProjectDB($projectId)->updateDocument(\array_merge($team->getArrayCopy(), [
|
||||
'sum' => \max($team->getAttribute('sum', 0) - 1, 0),
|
||||
'sum' => \max($team->getAttribute('sum', 0) - 1, 0), // Ensure that sum is always >= 0
|
||||
]));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user