mirror of
https://github.com/flarum/framework.git
synced 2024-11-27 19:13:37 +08:00
Return more relations when a discussion is created
This commit is contained in:
parent
34d150b24b
commit
52b476dc6b
|
@ -33,7 +33,7 @@ class CreateAction extends BaseAction
|
||||||
$this->dispatch($command, $params);
|
$this->dispatch($command, $params);
|
||||||
}
|
}
|
||||||
|
|
||||||
$serializer = new DiscussionSerializer(['posts']);
|
$serializer = new DiscussionSerializer(['posts', 'startUser', 'lastUser', 'startPost', 'lastPost']);
|
||||||
$document = $this->document()->setData($serializer->resource($discussion));
|
$document = $this->document()->setData($serializer->resource($discussion));
|
||||||
|
|
||||||
return $this->respondWithDocument($document);
|
return $this->respondWithDocument($document);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user