diff --git a/extend.php b/extend.php index 041a9202..ae3ea819 100755 --- a/extend.php +++ b/extend.php @@ -25,15 +25,15 @@ return [ (new Extend\Frontend('forum')) - ->js(__DIR__ . '/js/dist/forum.js') - ->css(__DIR__ . '/resources/less/forum.less') + ->js(__DIR__.'/js/dist/forum.js') + ->css(__DIR__.'/resources/less/forum.less') ->route('/polls', 'fof_polls_directory', Content\PollsDirectory::class), (new Extend\Frontend('admin')) - ->js(__DIR__ . '/js/dist/admin.js') - ->css(__DIR__ . '/resources/less/admin.less'), + ->js(__DIR__.'/js/dist/admin.js') + ->css(__DIR__.'/resources/less/admin.less'), - new Extend\Locales(__DIR__ . '/resources/locale'), + new Extend\Locales(__DIR__.'/resources/locale'), (new Extend\Routes('api')) ->post('/fof/polls', 'fof.polls.create', Controllers\CreatePollController::class) @@ -106,5 +106,5 @@ ->scope(Access\ScopePollVisibility::class), (new Extend\View()) - ->namespace('fof-polls', __DIR__ . '/resources/views'), + ->namespace('fof-polls', __DIR__.'/resources/views'), ]; diff --git a/src/Content/PollsDirectory.php b/src/Content/PollsDirectory.php index 4fb6d2f2..d7633233 100644 --- a/src/Content/PollsDirectory.php +++ b/src/Content/PollsDirectory.php @@ -1,5 +1,14 @@ api->withQueryParams($params)->withParentRequest($request)->get('/fof/polls')->getBody()); } - + public function __invoke(Document $document, ServerRequestInterface $request): Document { $queryParams = $request->getQueryParams();