Performance: Load only basic information about lastDiscussion

This commit is contained in:
Toby Zerner 2017-11-11 22:40:48 +10:30
parent 6a21d292c5
commit 89f417097b

View File

@ -12,7 +12,7 @@
namespace Flarum\Tags\Api\Serializer; namespace Flarum\Tags\Api\Serializer;
use Flarum\Api\Serializer\AbstractSerializer; use Flarum\Api\Serializer\AbstractSerializer;
use Flarum\Api\Serializer\DiscussionSerializer; use Flarum\Api\Serializer\DiscussionBasicSerializer;
class TagSerializer extends AbstractSerializer class TagSerializer extends AbstractSerializer
{ {
@ -64,6 +64,6 @@ class TagSerializer extends AbstractSerializer
*/ */
protected function lastDiscussion($tag) protected function lastDiscussion($tag)
{ {
return $this->hasOne($tag, DiscussionSerializer::class); return $this->hasOne($tag, DiscussionBasicSerializer::class);
} }
} }