content notification read working

This commit is contained in:
isUnknown 2024-12-19 10:32:48 +01:00
parent ffb8252808
commit 94c5737245
21 changed files with 317 additions and 163 deletions

View file

@ -12,7 +12,7 @@ class Notification
protected Author $author;
protected string $date;
protected string $id;
protected string $isRead = "false";
protected string $isread = "false";
protected ?Position $position = null;
@ -33,7 +33,7 @@ class Notification
"author" => $this->author->toArray(),
"date" => $this->date,
"id" => $this->id,
"isRead" => $this->isRead,
"isread" => $this->isread,
];
return $array;

View file

@ -10,7 +10,7 @@ return function($notificationId) {
foreach ($notifications as $key => $notification) {
if (!isset($notification['id'])) continue;
if ($notification['id'] === $notificationId) {
$notifications[$key]['isRead'] = true;
$notifications[$key]['isread'] = "true";
$newNotification = $notifications[$key];
}
}

View file

@ -8,7 +8,7 @@ return function() {
$newNotification = null;
foreach ($notifications as $key => $notification) {
$notifications[$key]['isRead'] = true;
$notifications[$key]['isread'] = true;
}
$updatedUser = $this->update([