summaryrefslogtreecommitdiff
path: root/modules/tag/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/tag/helpers')
-rw-r--r--modules/tag/helpers/tag_rest.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/tag/helpers/tag_rest.php b/modules/tag/helpers/tag_rest.php
index cfcf93b2..29b74510 100644
--- a/modules/tag/helpers/tag_rest.php
+++ b/modules/tag/helpers/tag_rest.php
@@ -60,7 +60,7 @@ class tag_rest_Core {
static function post($request) {
if (empty($request->arguments) || count($request->arguments) != 1 || empty($request->path)) {
- return rest::invalid_request();
+ Rest_Exception::trigger(400, "Bad request");
}
$path = $request->path;
$tags = explode(",", $request->arguments[0]);
@@ -85,7 +85,7 @@ class tag_rest_Core {
static function put($request) {
if (empty($request->arguments[0]) || empty($request->new_name)) {
- return rest::invalid_request();
+ Rest_Exception::trigger(400, "Bad request");
}
$name = $request->arguments[0];
@@ -105,7 +105,7 @@ class tag_rest_Core {
static function delete($request) {
if (empty($request->arguments[0])) {
- return rest::invalid_request();
+ Rest_Exception::trigger(400, "Bad request");
}
$tags = explode(",", $request->arguments[0]);
if (!empty($request->path)) {