mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 12:03:14 +00:00
Update API
This commit is contained in:
@@ -1926,9 +1926,9 @@ class API_V1_adapter extends API_V1_Abstract
|
||||
{
|
||||
$ret = array(
|
||||
'id' => $databox_field->get_id(),
|
||||
'namespace' => $databox_field->get_metadata_namespace(),
|
||||
'source' => $databox_field->get_metadata_source(),
|
||||
'tagname' => $databox_field->get_metadata_tagname(),
|
||||
'namespace' => $databox_field->get_tag()->getGroupName(),
|
||||
'source' => $databox_field->get_tag()->getTagname(),
|
||||
'tagname' => $databox_field->get_tag()->getName(),
|
||||
'name' => $databox_field->get_name(),
|
||||
'separator' => $databox_field->get_separator(),
|
||||
'thesaurus_branch' => $databox_field->get_tbranch(),
|
||||
|
@@ -295,33 +295,33 @@ class API_V1_result
|
||||
switch ($code = (int) $code) {
|
||||
case 400:
|
||||
$this->http_code = $code;
|
||||
$this->error_message = self::ERROR_BAD_REQUEST;
|
||||
$this->error_details = API_V1_exception_badrequest::get_details();
|
||||
$this->error_type = self::ERROR_BAD_REQUEST;
|
||||
$this->error_message = API_V1_exception_badrequest::get_details();
|
||||
break;
|
||||
case 401:
|
||||
$this->http_code = $code;
|
||||
$this->error_message = self::ERROR_UNAUTHORIZED;
|
||||
$this->error_details = API_V1_exception_unauthorized::get_details();
|
||||
$this->error_type = self::ERROR_UNAUTHORIZED;
|
||||
$this->error_message = API_V1_exception_unauthorized::get_details();
|
||||
break;
|
||||
case 403:
|
||||
$this->http_code = $code;
|
||||
$this->error_message = self::ERROR_FORBIDDEN;
|
||||
$this->error_details = API_V1_exception_forbidden::get_details();
|
||||
$this->error_type = self::ERROR_FORBIDDEN;
|
||||
$this->error_message = API_V1_exception_forbidden::get_details();
|
||||
break;
|
||||
case 404:
|
||||
$this->http_code = $code;
|
||||
$this->error_message = self::ERROR_NOTFOUND;
|
||||
$this->error_details = API_V1_exception_notfound::get_details();
|
||||
$this->error_type = self::ERROR_NOTFOUND;
|
||||
$this->error_message = API_V1_exception_notfound::get_details();
|
||||
break;
|
||||
case 405:
|
||||
$this->http_code = $code;
|
||||
$this->error_message = self::ERROR_METHODNOTALLOWED;
|
||||
$this->error_details = API_V1_exception_methodnotallowed::get_details();
|
||||
$this->error_type = self::ERROR_METHODNOTALLOWED;
|
||||
$this->error_message = API_V1_exception_methodnotallowed::get_details();
|
||||
break;
|
||||
case 500:
|
||||
$this->http_code = $code;
|
||||
$this->error_message = self::ERROR_INTERNALSERVERERROR;
|
||||
$this->error_details = API_V1_exception_internalservererror::get_details();
|
||||
$this->error_type = self::ERROR_INTERNALSERVERERROR;
|
||||
$this->error_message = API_V1_exception_internalservererror::get_details();
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user