Skip to content

Commit ff0d9e5

Browse files
author
Leny BERNARD
committed
Merge pull request #419 from lenybernard/master
log and return a null 202 response when an heart beat
2 parents bec163f + f3c19ef commit ff0d9e5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Bundle/AnalyticsBundle/Controller/BrowseEventController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ public function heartbeatAction($id)
4444
$user = $entityManager->getRepository($this->getParameter('victoire_core.user_class'))->find($id);
4545
$user->setHeartbeat(new \DateTime());
4646
$entityManager->flush();
47+
$this->get('logger')->info('victoire.analytics.user_heartbeat');
4748

48-
return new JsonResponse(['Glad you\'re alive :beating-heart:']);
49+
return new Response(null, 202);
4950
}
5051
}

Bundle/CoreBundle/Route/RouteLoader.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ protected function addShowHomePageRoute(RouteCollection &$collection)
115115
$defaults = [
116116
'_controller' => 'VictoirePageBundle:Page:show',
117117
];
118-
$route = new Route($pattern, $defaults);
118+
$options = [
119+
'expose' => true,
120+
];
121+
$route = new Route($pattern, $defaults, [], $options);
119122

120123
// add the new route to the route collection:
121124
$collection->add('victoire_core_homepage_show', $route);

0 commit comments

Comments
 (0)