add notifications plugin + created reply comment route

This commit is contained in:
isUnknown 2024-10-29 11:35:48 +01:00
parent b332c6d871
commit c3860d4a38
6 changed files with 53 additions and 5 deletions

View file

@ -26,7 +26,6 @@ return [
require(__DIR__ . '/routes/save-file.php'),
require(__DIR__ . '/routes/remove-file.php'),
require(__DIR__ . '/routes/upload-pdf.php'),
require(__DIR__ . '/routes/read-notification.php'),
],
'hooks' => [
'page.create:after' => require_once(__DIR__ . '/hooks/create-steps.php'),

View file

@ -1,15 +0,0 @@
<?php
return [
'pattern' => '(:all)read-notification.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;
}
];