summaryrefslogtreecommitdiff
path: root/modules/rest/helpers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-12-08 12:50:13 -0800
committerTim Almdal <tnalmdal@shaw.ca>2009-12-08 12:50:13 -0800
commit6fd04069aec67ff115cac4296c013cb5eea6782b (patch)
treed2f030064e3330aff7a3a822e59be25f597a1957 /modules/rest/helpers
parentfa0663d7df0cfcf0818e182f3d2d19fc6be2a5d1 (diff)
Add another error handler "not found" to the rest API.
Implement the get_album rest request handler.
Diffstat (limited to 'modules/rest/helpers')
-rw-r--r--modules/rest/helpers/rest.php11
1 files changed, 9 insertions, 2 deletions
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");