Return more relations when a discussion is created

This commit is contained in:
Toby Zerner 2015-04-25 22:37:25 +09:30
parent 6669f340dd
commit 153098c08f

View File

@ -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);