Skip to content

Commit

Permalink
to return correct code when group not found
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
  • Loading branch information
bigcat88 authored and backportbot-nextcloud[bot] committed Jul 27, 2023
1 parent 81d8d32 commit 4943a46
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/provisioning_api/lib/Controller/GroupsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ public function updateGroup(string $groupId, string $key, string $value): DataRe

if ($key === 'displayname') {
$group = $this->groupManager->get($groupId);
if ($group === null) {
throw new OCSException('Group does not exist', OCSController::RESPOND_NOT_FOUND);
}
if ($group->setDisplayName($value)) {
return new DataResponse();
}
Expand Down

0 comments on commit 4943a46

Please sign in to comment.