From fa8a2e37e3be6af6fae095c0e4aa2c95be274fa6 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Mon, 1 Mar 2021 00:30:04 -0500 Subject: [PATCH] Fix missing PostRepository argument This was accidentially removed in 9157efe426c4b90a1d41561fb350f52efc72d3e9 --- .../core/src/Api/Controller/ListPostsController.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/framework/core/src/Api/Controller/ListPostsController.php b/framework/core/src/Api/Controller/ListPostsController.php index e1a7e1022..7cb429b4b 100644 --- a/framework/core/src/Api/Controller/ListPostsController.php +++ b/framework/core/src/Api/Controller/ListPostsController.php @@ -12,6 +12,7 @@ namespace Flarum\Api\Controller; use Flarum\Api\Serializer\PostSerializer; use Flarum\Http\UrlGenerator; use Flarum\Post\Filter\PostFilterer; +use Flarum\Post\PostRepository; use Flarum\Search\SearchCriteria; use Illuminate\Support\Arr; use Psr\Http\Message\ServerRequestInterface; @@ -46,6 +47,11 @@ class ListPostsController extends AbstractListController */ protected $filterer; + /** + * @var PostRepository + */ + protected $posts; + /** * @var UrlGenerator */ @@ -53,11 +59,13 @@ class ListPostsController extends AbstractListController /** * @param PostFilterer $filterer + * @param PostRepository $posts * @param UrlGenerator $url */ - public function __construct(PostFilterer $filterer, UrlGenerator $url) + public function __construct(PostFilterer $filterer, PostRepository $posts, UrlGenerator $url) { $this->filterer = $filterer; + $this->posts = $posts; $this->url = $url; }