Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass filter params to getApiDocument #3037

Merged
merged 2 commits into from
Aug 26, 2021
Merged

Conversation

imorland
Copy link
Member

Companion PR to flarum/tags#141

Currently, any filter params that are passed toForum\ Content\Index are ignored. As discussed with @askvortsov1 here is a solution...

@@ -77,6 +78,8 @@ public function __invoke(Document $document, Request $request)
'page' => ['offset' => ($page - 1) * 20, 'limit' => 20]
];

$params['filter'] = array_merge($filters, $params['filter']);
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since $params['filter'] is empty here, let's just set 'filter' => $filters in the $params = ... code above?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :)

@SychO9 SychO9 added this to the 1.1 milestone Aug 26, 2021
@SychO9 SychO9 merged commit 581d951 into flarum:master Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants