Skip to content

Commit

Permalink
Use toArray representation of sites for the server. Fixes #44
Browse files Browse the repository at this point in the history
  • Loading branch information
mpociot committed Jun 19, 2020
1 parent 2c0c544 commit 262a1ea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/Server/Http/Controllers/Admin/ListSitesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ public function handle(Request $request, ConnectionInterface $httpConnection)
$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(
Expand Down

0 comments on commit 262a1ea

Please sign in to comment.