Two months of stats
This commit is contained in:
parent
ff597c3344
commit
d4537fdac2
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue