mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
- Added new protected method getPostJSON to FHC_Controller to get POSTed JSON
- application/controllers/components/Filter.php now makes use of getPostJSON from the FHC_Controller - RESTClient now POST a JSON request - public/js/components/filter/Filter.js improvements
This commit is contained in:
@@ -159,6 +159,15 @@ abstract class FHC_Controller extends CI_Controller
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the JSON decoded HTTP POST request
|
||||
* If the request is not in JSON format then a null value is returned
|
||||
*/
|
||||
protected function getPostJSON()
|
||||
{
|
||||
return json_decode($this->input->raw_input_stream);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
@@ -175,3 +184,4 @@ abstract class FHC_Controller extends CI_Controller
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user