track type management
This commit is contained in:
parent
33928eaf73
commit
1d7d937a7f
29 changed files with 3082 additions and 74 deletions
|
@ -27,6 +27,7 @@ class ApiController extends Zend_Controller_Action
|
|||
"show-schedules",
|
||||
"show-logo",
|
||||
"track",
|
||||
"track-types",
|
||||
"stream-m3u"
|
||||
);
|
||||
|
||||
|
@ -635,6 +636,22 @@ class ApiController extends Zend_Controller_Action
|
|||
}
|
||||
}
|
||||
|
||||
public function trackTypesAction()
|
||||
{
|
||||
if (Application_Model_Preference::GetAllow3rdPartyApi() || $this->checkAuth()) {
|
||||
// disable the view and the layout
|
||||
$this->view->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$tracktypes = Application_Model_Tracktype::getTracktypes();
|
||||
$this->_helper->json->sendJson($tracktypes);
|
||||
} else {
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
print _('You are not allowed to access this resource. ');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* API endpoint to provide station metadata
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue