mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-10 17:29:18 -04:00
Add output formats to our REST controllers. Add support for JSON and
XML to the comment controllers as a proof of concept. It's not fully baked; we should examine ways to create helpers to make this process easier.
This commit is contained in:
@@ -31,10 +31,10 @@ class Comments_Controller extends REST_Controller {
|
||||
|
||||
/**
|
||||
* Show the comment collection
|
||||
* @see Rest_Controller::_get($resource)
|
||||
* @see Rest_Controller::_get($resource, $format)
|
||||
*/
|
||||
public function _get($item) {
|
||||
print comment::get_comments($item);
|
||||
public function _get($item, $output_format) {
|
||||
print comment::get_comments($item, $output_format);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user