mirror of
https://github.com/flarum/framework.git
synced 2025-01-19 18:12:59 +08:00
Add removed posts as an API attribute
This commit is contained in:
parent
20b8c13383
commit
0582d8e60f
|
@ -21,6 +21,10 @@ class DiscussionBasicSerializer extends BaseSerializer
|
|||
'title' => $discussion->title
|
||||
];
|
||||
|
||||
if (count($discussion->removedPosts)) {
|
||||
$attributes['removedPosts'] = $discussion->removedPosts;
|
||||
}
|
||||
|
||||
return $this->extendAttributes($discussion, $attributes);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user