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 #141

Merged
merged 2 commits into from
Aug 26, 2021
Merged

Pass filter params #141

merged 2 commits into from
Aug 26, 2021

Conversation

imorland
Copy link
Member

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

Similar PR will be opened for core shortly :)

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

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

Choose a reason for hiding this comment

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

$filters should override $params['filter'] on collision, so these should be swapped

Copy link
Member Author

Choose a reason for hiding this comment

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

🙈 whoops, apologies. Swapped

@SychO9 SychO9 merged commit 0db985a into flarum:master Aug 26, 2021
askvortsov1 pushed a commit that referenced this pull request Mar 11, 2022
* Pass  params to getApiDocument

* Reverse arrays
askvortsov1 pushed a commit that referenced this pull request May 10, 2022
* Pass  params to getApiDocument

* Reverse arrays
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants