'(:all)mark-as-read.json', 'method' => 'POST', 'action' => function () { $json = file_get_contents('php://input'); $data = json_decode($json); $user = kirby()->user($data->userUuid); $newNotifications = $user->readNotification($data->group, $data->notificationId); return $newNotifications; } ];