summaryrefslogtreecommitdiffstats
path: root/settings/controller
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-12-08 16:35:13 +0100
committerLukas Reschke <lukas@owncloud.com>2014-12-08 16:35:13 +0100
commitc23957811d31812cc9193eae0c83f6d7648b971b (patch)
tree114f922795e913d2a71e251f48d43b6833b7e9c2 /settings/controller
parent5f43809ace0068cd577959e4a522292ec3a1c9bb (diff)
downloadnextcloud-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.php10
-rw-r--r--settings/controller/userscontroller.php14
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
);