Stats per day
This commit is contained in:
parent
bdca46d286
commit
5c95018ddf
1 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,7 @@ class StatsControllerProvider implements ControllerProviderInterface
|
|||
|
||||
$controllers->get('/', function (Application $app) {
|
||||
$gameRepo = $this->_eh->getEm()->getRepository(Models\Game::class);
|
||||
|
||||
|
||||
$stats = [
|
||||
'new_games' => [],
|
||||
'new_users' => [],
|
||||
|
@ -35,7 +35,7 @@ class StatsControllerProvider implements ControllerProviderInterface
|
|||
|
||||
for ($i=0; $i < 14; $i++) {
|
||||
$day = date('Y-m-d',strtotime("-$i days"));
|
||||
$stats['new_games'] = $gameRepo->getCreatedCountOnDate($day);
|
||||
$stats['new_games'][$day] = $gameRepo->getCreatedCountOnDate($day);
|
||||
}
|
||||
return $app['serializer']->serialize($stats, 'json');
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue