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

If a key with an empty array value exists in the data source, the api /collectionId endpoint returns the NotFound state. #87

Closed
minamoeini opened this issue Feb 13, 2022 · 1 comment · Fixed by #88
Assignees

Comments

@minamoeini
Copy link

When there is an empty collection in JSON file, we can get it as a Key by using the Get all endpoint, but api/collectionId endpoint returns notfound status and it is confusing.

The minor change could be that if collection's count in this function (collection = _ds.GetCollection (collectionId)) is 0, the endpoint should return empty array as a result

@ttu ttu self-assigned this Feb 15, 2022
@ttu
Copy link
Owner

ttu commented Feb 15, 2022

Hi! Thanks for the issue.

This is a good point, can't remember why I did originally choose to return 404 for empty collections.
Fix: #88

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 a pull request may close this issue.

2 participants