chg: [restResponseComponent] Get scoped available endpoints

pull/7355/head
mokaddem 2021-04-01 11:13:26 +02:00
parent 7fbb47b7a4
commit d71bcf946f
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 10 additions and 0 deletions

View File

@ -428,6 +428,16 @@ class RestResponseComponent extends Component
return $result;
}
public function getScopedApiInfo($user)
{
$api = $this->getAllApis($user);
$scopedApi = [];
foreach ($api as $apiEntry) {
$scopeApi[$apiEntry['controller']][] = $apiEntry;
}
return $scopeApi;
}
/**
* Use a relative path to check if the current api has a description
* @param string $relative_path