From 6fd04069aec67ff115cac4296c013cb5eea6782b Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 8 Dec 2009 12:50:13 -0800 Subject: Add another error handler "not found" to the rest API. Implement the get_album rest request handler. --- modules/rest/helpers/rest.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'modules/rest/helpers') diff --git a/modules/rest/helpers/rest.php b/modules/rest/helpers/rest.php index 34852a9e..64a32d40 100644 --- a/modules/rest/helpers/rest.php +++ b/modules/rest/helpers/rest.php @@ -32,7 +32,7 @@ class rest_Core { } /** - * Not implemented + * Not Implemented */ static function not_implemented($log_message=null) { return self::_format_response(t("Service not implemented"), $log_message); @@ -46,7 +46,14 @@ class rest_Core { } /** - * Not implemented + * Resource Not Found + */ + static function not_found($log_message=null) { + return self::_format_response(t("Internal error"), $log_message); + } + + /** + * Success */ static function success($response_data, $message=null) { $response = array("status" => "OK"); -- cgit v1.2.3