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

🐛 API Returns Empty Response When 'score' and 'producers' Parameters are Used Together #517

Closed
1 task done
mirzaahmedov opened this issue Feb 15, 2024 · 2 comments · Fixed by #528
Closed
1 task done
Assignees
Labels

Comments

@mirzaahmedov
Copy link

mirzaahmedov commented Feb 15, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

The API returns an empty response when both the 'score' and 'producers' query parameters are included in the request.

Expected Behavior

The API should return a response containing relevant data, filtered based on the provided 'score' and 'producers' query parameters.

Steps To Reproduce

Make a request to the API endpoint with both the 'score' and 'producers' query parameters set.
Observe that the API response is empty.

Environment

- OS: Linux
- Browser: Brave

Anything else?

API Endpoint: https://api.jikan.moe/v4/anime
Query Parameters:
score: 8
producers: 11
Example Request: https://api.jikan.moe/v4/anime?score=8&producers=11

screenshot

@irfan-dahir
Copy link
Contributor

Good catch. Meanwhile, a working alternative would be this: https://api.jikan.moe/v4/anime?min_score=8&producers=11

@pushrbx
Copy link
Collaborator

pushrbx commented Feb 15, 2024

Possible cause: we use $query->whereRaw() for the producers filter, which obliterates other calls to the query builder.

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

Successfully merging a pull request may close this issue.

3 participants