* SAAS-1084 - initial work on publishing API backend
* More work on automatic ingest * Add automatic_ingest_timestamp column to ImportedPodcast
This commit is contained in:
parent
3a791ef9b5
commit
0b1df6baf3
27 changed files with 490 additions and 106 deletions
|
@ -185,6 +185,23 @@ class Rest_MediaController extends Zend_Rest_Controller
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Publish endpoint for individual media items
|
||||
*/
|
||||
public function publishAction() {
|
||||
$id = $this->getId();
|
||||
try {
|
||||
// Is there a better way to do this?
|
||||
$data = json_decode($this->getRequest()->getRawBody(), true)["sources"];
|
||||
Application_Service_MediaService::publish($id, $data);
|
||||
$this->getResponse()
|
||||
->setHttpResponseCode(200);
|
||||
} catch (Exception $e) {
|
||||
$this->unknownErrorResponse();
|
||||
Logging::error($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private function getId()
|
||||
{
|
||||
if (!$id = $this->_getParam('id', false)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue