From 941a0b2c8ad3fe771cd569aaf02d1e84c20978af Mon Sep 17 00:00:00 2001 From: Dave Shoreman Date: Mon, 10 Apr 2017 23:23:32 +0100 Subject: [PATCH] Specify available includes for /api/tags endpoint --- .../tags/src/Api/Controller/ListTagsController.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/extensions/tags/src/Api/Controller/ListTagsController.php b/extensions/tags/src/Api/Controller/ListTagsController.php index b2a43376d..0d2038805 100644 --- a/extensions/tags/src/Api/Controller/ListTagsController.php +++ b/extensions/tags/src/Api/Controller/ListTagsController.php @@ -24,6 +24,20 @@ class ListTagsController extends AbstractCollectionController */ public $serializer = TagSerializer::class; + /** + * {@inheritdoc} + */ + public $include = [ + 'parent', + ]; + + /** + * {@inheritdoc} + */ + public $optionalInclude = [ + 'lastDiscussion', + ]; + /** * @var \Flarum\Tags\Tag */