Two months of stats

This commit is contained in:
Ruben 2017-03-31 12:40:52 +02:00
parent ff597c3344
commit d4537fdac2

View file

@ -38,13 +38,13 @@ class StatsControllerProvider implements ControllerProviderInterface
], ],
]; ];
for ($i=0; $i < 14; $i++) { for ($i=0; $i < 61; $i++) {
$day = date('Y-m-d',strtotime("-$i days")); $day = date('Y-m-d',strtotime("-$i days"));
$stats['games']['new'][$day] = $gameRepo->getCreatedCountOnDate($day); $stats['games']['new'][$day] = $gameRepo->getCreatedCountOnDate($day);
} }
$stats['games']['total'] = $gameRepo->getCount(); $stats['games']['total'] = $gameRepo->getCount();
return new CustomJsonResponse($stats, function($data) use ($app){return $app['serializer']->serialize($data, 'json');}, 200); return new CustomJsonResponse($stats, function($data) use ($app){return $app['serializer']->serialize($data, 'json');}, 200);
}); });