diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-12-08 16:35:13 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-12-08 16:35:13 +0100 |
commit | c23957811d31812cc9193eae0c83f6d7648b971b (patch) | |
tree | 114f922795e913d2a71e251f48d43b6833b7e9c2 /settings/controller | |
parent | 5f43809ace0068cd577959e4a522292ec3a1c9bb (diff) | |
download | nextcloud-server-c23957811d31812cc9193eae0c83f6d7648b971b.tar.gz nextcloud-server-c23957811d31812cc9193eae0c83f6d7648b971b.zip |
React on other statuscodes than 200
Diffstat (limited to 'settings/controller')
-rw-r--r-- | settings/controller/groupscontroller.php | 10 | ||||
-rw-r--r-- | settings/controller/userscontroller.php | 14 |
2 files changed, 6 insertions, 18 deletions
diff --git a/settings/controller/groupscontroller.php b/settings/controller/groupscontroller.php index 8236d5507f4..82e72821c3d 100644 --- a/settings/controller/groupscontroller.php +++ b/settings/controller/groupscontroller.php @@ -82,10 +82,7 @@ class GroupsController extends Controller { if($this->groupManager->groupExists($id)) { return new DataResponse( array( - 'status' => 'error', - 'data' => array( - 'message' => (string)$this->l10n->t('Group already exists.') - ) + 'message' => (string)$this->l10n->t('Group already exists.') ), Http::STATUS_CONFLICT ); @@ -93,10 +90,7 @@ class GroupsController extends Controller { if($this->groupManager->createGroup($id)) { return new DataResponse( array( - 'status' => 'success', - 'data' => array( - 'groupname' => $id - ) + 'groupname' => $id ), Http::STATUS_CREATED ); diff --git a/settings/controller/userscontroller.php b/settings/controller/userscontroller.php index aa16574221e..5bd4b555106 100644 --- a/settings/controller/userscontroller.php +++ b/settings/controller/userscontroller.php @@ -161,10 +161,7 @@ class UsersController extends Controller { } catch (\Exception $exception) { return new DataResponse( array( - 'status' => 'error', - 'data' => array( - 'message' => (string)$this->l10n->t('Unable to create user.') - ) + 'message' => (string)$this->l10n->t('Unable to create user.') ), Http::STATUS_FORBIDDEN ); @@ -183,12 +180,9 @@ class UsersController extends Controller { return new DataResponse( array( - 'status' => 'success', - 'data' => array( - 'username' => $username, - 'groups' => $this->groupManager->getUserGroupIds($user), - 'storageLocation' => $user->getHome() - ) + 'username' => $username, + 'groups' => $this->groupManager->getUserGroupIds($user), + 'storageLocation' => $user->getHome() ), Http::STATUS_CREATED ); |