mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
to return correct code when group not found
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
This commit is contained in:
parent
81d8d324e1
commit
4943a4668a
1 changed files with 3 additions and 0 deletions
|
|
@ -271,6 +271,9 @@ class GroupsController extends AUserData {
|
|||
|
||||
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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue