1
0
mirror of https://github.com/flarum/core.git synced 2025-10-09 22:16:51 +02:00

Extract current user attributes into a separate serializer

This prevents the unread notifications count query being run for every
post by the currently authenticated user
This commit is contained in:
Toby Zerner
2015-06-01 12:25:40 +09:30
parent 0f9549f4b9
commit bb1491e19e
3 changed files with 25 additions and 12 deletions

View File

@@ -17,7 +17,7 @@ class ShowAction extends SerializeResourceAction
*
* @var string
*/
public static $serializer = 'Flarum\Api\Serializers\UserSerializer';
public static $serializer = 'Flarum\Api\Serializers\CurrentUserSerializer';
/**
* The relationships that are available to be included, and which ones are