Describe the bug
Calling curl https://dev.to/api/articles?state=all
results in a 500 error.
Although, according to the documentation, that specific parameter is only to be used in conjunction with username
, used by itself shouldn't result in a 500 error, instead it should return an empty result set.
To Reproduce
curl https://dev.to/api/articles?state=all
or curl http://localhost:3000/api/articles?state=all
in your local development environmentExpected behavior
Calling curl https://dev.to/api/articles?state=all
should return an empty JSON array
Additional context
The issue is likely the missing else
condition here:
I can take a look at this. :slightly_smiling_face:
@rhymes plz review and merge
@tudorpavel just FYI, @sabunt submit a PR for this