This commit is contained in:
Yuri Kuznetsov
2021-09-30 16:47:53 +03:00
parent be9fd29023
commit b3e5003e0c
12 changed files with 139 additions and 66 deletions
+10 -5
View File
@@ -31,20 +31,20 @@ namespace Espo\Controllers;
use Espo\Core\Exceptions\Forbidden;
use Espo\Services\Metadata as Service;
use Espo\Core\{
Controllers\Base,
Api\Request,
};
use StdClass;
use stdClass;
class Metadata extends Base
{
public function getActionRead(): StdClass
public function getActionRead(): stdClass
{
return $this->getServiceFactory()
->create('Metadata')
->getDataForFrontend();
return $this->getMetadataService()->getDataForFrontend();
}
public function getActionGet(Request $request)
@@ -57,4 +57,9 @@ class Metadata extends Base
return $this->metadata->get($key, false);
}
private function getMetadataService(): Service
{
return $this->getServiceFactory()->create('Metadata');
}
}