cc-2182: Convert back to restful design
-done
This commit is contained in:
parent
9e01e389ea
commit
8e2019a935
10 changed files with 9 additions and 8 deletions
|
@ -6,7 +6,7 @@
|
|||
* /etc/airtime/recorder.cfg
|
||||
*/
|
||||
|
||||
define('AIRTIME_VERSION', '1.8.1');
|
||||
define('AIRTIME_VERSION', '1.9.0-devel');
|
||||
define('AIRTIME_COPYRIGHT_DATE', '2010-2011');
|
||||
define('AIRTIME_REST_VERSION', '1.1');
|
||||
|
||||
|
@ -78,6 +78,7 @@ class Config {
|
|||
$CC_CONFIG['dsn']['username'] = $values['database']['dbuser'];
|
||||
$CC_CONFIG['dsn']['password'] = $values['database']['dbpass'];
|
||||
$CC_CONFIG['dsn']['hostspec'] = $values['database']['host'];
|
||||
$CC_CONFIG['dsn']['phptype'] = 'pgsql';
|
||||
$CC_CONFIG['dsn']['database'] = $values['database']['dbname'];
|
||||
|
||||
$CC_CONFIG['apiKey'] = array($values['general']['api_key']);
|
||||
|
|
|
@ -163,7 +163,7 @@ class ApiController extends Zend_Controller_Action
|
|||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$api_key = $this->_getParam('api_key');
|
||||
|
||||
|
||||
if(!in_array($api_key, $CC_CONFIG["apiKey"]))
|
||||
{
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
|
|
|
@ -1513,8 +1513,7 @@ class StoredFile {
|
|||
public function getFileUrl()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
return "http://$CC_CONFIG[baseUrl]:$CC_CONFIG[basePort]/".$this->gunid.".".$this->getFileExtension();
|
||||
//return $CC_CONFIG["base_url"]..$this->gunid.".".$this->getFileExtension();
|
||||
return "http://$CC_CONFIG[baseUrl]:$CC_CONFIG[basePort]/api/get-media/file/".$this->gunid.".".$this->getFileExtension();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue