content notification read working
This commit is contained in:
parent
ffb8252808
commit
94c5737245
21 changed files with 317 additions and 163 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ return function() {
|
|||
|
||||
$newNotification = null;
|
||||
foreach ($notifications as $key => $notification) {
|
||||
$notifications[$key]['isRead'] = true;
|
||||
$notifications[$key]['isread'] = true;
|
||||
}
|
||||
|
||||
$updatedUser = $this->update([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue