Use toArray representation of sites for the server. Fixes #44

This commit is contained in:
Marcel Pociot
2020-06-19 09:13:26 +02:00
parent 2c0c544eeb
commit 262a1eac4a

View File

@@ -25,7 +25,12 @@ class ListSitesController extends AdminController
$sites = $this->getView($httpConnection, 'server.sites.index', [
'scheme' => $this->configuration->port() === 443 ? 'https' : 'http',
'configuration' => $this->configuration,
'sites' => $this->connectionManager->getConnections(),
'sites' => collect($this->connectionManager->getConnections())->map(function ($site, $siteId) {
$site = $site->toArray();
$site['id'] = $siteId;
return $site;
})->values(),
]);
$httpConnection->send(