Anilist Advanced Search "Format" parameter lacks "ALL" option.
Closed this issue · 1 comments
Dudeofman commented
Describe the bug
Due to the "ALL" option not being present, sending an empty "Format" payload to the API causes a 500 server error.
In addition, performing an empty query search to retrieve a list of anime from a particular set of genres brings back an empty response.
Steps to reproduce
- await axios
.get(
https://consumet-api.herokuapp.com/meta/anilist/advanced-search
,
{
params: {
query: searchQuery,
page: currentPage,
perPage: 25,
format: "",
genres
type: "ANIME ",
sort,
},
}
)
2. A 500 error will be received.
Expected behavior
With the presence of an "ALL" default option, this error could be assuaged.
In edition, performing an empty query search with genres selected should retrieve anime from those genres.
Actual behavior
Error 500 for the format issue. Empty response from the query and genres issue.
Additional context
No response
Dudeofman commented
Fixed this on my end. Please ignore .
Solution on JS:
params: {
...(searchQuery && { query: searchQuery }),
conditional params.