#68 - create comment create working (notification to adapt)
This commit is contained in:
parent
3d4ddc12fc
commit
cf83edc1e6
11 changed files with 106 additions and 158 deletions
|
|
@ -12,7 +12,7 @@ class Notification
|
|||
protected Author $author;
|
||||
protected string $date;
|
||||
protected string $id;
|
||||
protected string $isRead;
|
||||
protected string $isRead = "false";
|
||||
|
||||
protected ?Position $position = null;
|
||||
|
||||
|
|
@ -23,11 +23,6 @@ class Notification
|
|||
$this->author = new Author($data["author"]);
|
||||
$this->date = $data["date"];
|
||||
$this->id = $data["id"];
|
||||
$this->isRead = "false";
|
||||
|
||||
if ($data["type"] === "comment") {
|
||||
$this->position = new Position($data["position"]);
|
||||
}
|
||||
}
|
||||
|
||||
public function toArray() {
|
||||
|
|
@ -40,9 +35,6 @@ class Notification
|
|||
"id" => $this->id,
|
||||
"isRead" => $this->isRead,
|
||||
];
|
||||
if ($this->type === "comment") {
|
||||
$array["position"] = $this->position->toArray();
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue