mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
PHRAS-3442_optimize-list-notifications_4.1-bis
WIP poll only from menubar (Aina) back : only one method/route to fetch notifs front : fix exponential pagination big refacto todo : mark read notifications (button ? click ?)
This commit is contained in:
@@ -21,6 +21,7 @@ class UserNotificationController extends Controller
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
*/
|
||||
/* remove in favor of existing /session/ route
|
||||
public function readNotifications(Request $request)
|
||||
{
|
||||
if (!$request->isXmlHttpRequest()) {
|
||||
@@ -38,6 +39,7 @@ class UserNotificationController extends Controller
|
||||
return $this->app->json(['success' => false, 'message' => $e->getMessage()]);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get all notifications
|
||||
@@ -45,6 +47,7 @@ class UserNotificationController extends Controller
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
*/
|
||||
/* remove in favor of existing /session/ route
|
||||
public function listNotifications(Request $request)
|
||||
{
|
||||
if (!$request->isXmlHttpRequest()) {
|
||||
@@ -55,12 +58,15 @@ class UserNotificationController extends Controller
|
||||
|
||||
return $this->app->json($this->getEventsManager()->get_notifications_as_array(($page < 0 ? 0 : $page)));
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @return \eventsmanager_broker
|
||||
*/
|
||||
/* remove in favor of existing /session/ route
|
||||
private function getEventsManager()
|
||||
{
|
||||
return $this->app['events-manager'];
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
Reference in New Issue
Block a user