mirror of
https://github.com/flarum/framework.git
synced 2024-12-02 15:03:44 +08:00
Return more relations when a discussion is created
This commit is contained in:
parent
6669f340dd
commit
153098c08f
|
@ -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