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 julien-nc committed Jul 31, 2023
1 parent 8cb59d3 commit d1260b8
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 d1260b8

Please sign in to comment.