mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 03:23:19 +00:00
fix #601 add consistency, add type key, rename install_name -> name
This commit is contained in:
@@ -30,13 +30,17 @@ return call_user_func(function() {
|
||||
$app["appbox"] = \appbox::get_instance($app['Core']);
|
||||
|
||||
$app->get(
|
||||
'/', function() use ($app) {
|
||||
'/', function(Request $request) use ($app) {
|
||||
$registry = $app["Core"]->getRegistry();
|
||||
|
||||
$apiAdapter = new \API_V1_adapter(false, $app["appbox"], $app["Core"]);
|
||||
$versionNumber = (float) \Alchemy\Phrasea\Core\Version::getNumber();
|
||||
$ret = array(
|
||||
'install_name' => $registry->get('GV_homeTitle'),
|
||||
|
||||
$result = new \API_V1_result($request, $apiAdapter);
|
||||
|
||||
$result->set_datas(
|
||||
array(
|
||||
'name' => $registry->get('GV_homeTitle'),
|
||||
'type' => 'phraseanet',
|
||||
'description' => $registry->get('GV_metaDescription'),
|
||||
'documentation' => 'https://docs.phraseanet.com/Devel',
|
||||
'versions' => array(
|
||||
@@ -51,11 +55,10 @@ return call_user_func(function() {
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$json = $app["Core"]['Serializer']->serialize($ret, 'json');
|
||||
|
||||
return new Response($json, 200, array('content-type' => 'application/json'));
|
||||
return $result->get_response();
|
||||
});
|
||||
|
||||
return $app;
|
||||
|
@@ -24,7 +24,7 @@ class API_V1_adapter extends API_V1_Abstract
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $version = '1.1';
|
||||
protected $version = '1.2';
|
||||
|
||||
/**
|
||||
* Appbox where the API works
|
||||
|
Reference in New Issue
Block a user