diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-25 21:54:26 +0100 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-25 21:54:26 +0100 |
commit | 3a237701e0c9ea8ea2bc4f5e6e4ac840282ab5fa (patch) | |
tree | 2e4b316de79ac297f6c66c89daaae0d5fced357c /controller | |
parent | 0430a6ca38545463d7eea070204d77bddb447437 (diff) |
return empty json responses when nothing has been done
Diffstat (limited to 'controller')
-rw-r--r-- | controller/itemcontroller.php | 8 | ||||
-rw-r--r-- | controller/usersettingscontroller.php | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/controller/itemcontroller.php b/controller/itemcontroller.php index ce76f3cab..44b7f9684 100644 --- a/controller/itemcontroller.php +++ b/controller/itemcontroller.php @@ -107,6 +107,8 @@ class ItemController extends Controller { */ public function star(){ $this->setStarred(true); + + return $this->renderJSON(); } @@ -117,6 +119,8 @@ class ItemController extends Controller { */ public function unstar(){ $this->setStarred(false); + + return $this->renderJSON(); } @@ -134,6 +138,8 @@ class ItemController extends Controller { */ public function read(){ $this->setRead(true); + + return $this->renderJSON(); } @@ -144,6 +150,8 @@ class ItemController extends Controller { */ public function unread(){ $this->setRead(false); + + return $this->renderJSON(); } diff --git a/controller/usersettingscontroller.php b/controller/usersettingscontroller.php index 9900d98d8..157dee7ff 100644 --- a/controller/usersettingscontroller.php +++ b/controller/usersettingscontroller.php @@ -63,6 +63,8 @@ class UserSettingsController extends Controller { public function show(){ $userId = $this->api->getUserId(); $this->api->setUserValue($userId, 'showAll', true); + + return $this->renderJSON(); } @@ -74,6 +76,8 @@ class UserSettingsController extends Controller { public function hide(){ $userId = $this->api->getUserId(); $this->api->setUserValue($userId, 'showAll', false); + + return $this->renderJSON(); } |