From 14a52d102f97b14b5c582e36d042f8f83bdad72b Mon Sep 17 00:00:00 2001 From: Robbie Mackay Date: Fri, 23 Jan 2015 09:26:45 +1300 Subject: [PATCH] Fix errors in Rest controller, and missing OPTIONS action for /users/me --- application/classes/Controller/Api/Users.php | 10 ++++++++++ application/classes/Ushahidi/Rest.php | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/application/classes/Controller/Api/Users.php b/application/classes/Controller/Api/Users.php index cd8d818b6d..2d22eb7c03 100644 --- a/application/classes/Controller/Api/Users.php +++ b/application/classes/Controller/Api/Users.php @@ -32,6 +32,16 @@ public function action_get_me() } } + /** + * Get options for /users/me + * + * @return void + */ + public function action_options_me() + { + $this->response->status(200); + } + /** * Update current user * diff --git a/application/classes/Ushahidi/Rest.php b/application/classes/Ushahidi/Rest.php index 6d906d7a15..a248fc7146 100644 --- a/application/classes/Ushahidi/Rest.php +++ b/application/classes/Ushahidi/Rest.php @@ -21,6 +21,16 @@ abstract class Ushahidi_Rest extends Controller { */ protected static $version = '2'; + /** + * @var Object Request Payload + */ + protected $_request_payload = NULL; + + /** + * @var Object Response Payload + */ + protected $_response_payload = NULL; + /** * @var array Map of HTTP methods -> actions */