Query parameter `limit=0` will return all list
Closed this issue · 1 comments
itsnikhil commented
Bug Description
When limit is 0, server is returning all the records which can easily cause OOM or huge load on server which I expect to not happen.
(P.S.: Not sure to call it a bug or it is expected behavior)
Steps to Reproduce
Steps to reproduce the behavior:
- Go to 'http://54.183.16.194/bank_transactions?format=json&limit=0'
- See result
Expected behavior
Limit should be greater than 0 and less than or equal to 100.
Actual behavior
Limit can be set to 0
OS and Browser
- OS: Windows 11
- Browser: Chromium Edge
Account Number
e9c5acac0806aca6ba2c0ade74d93ec4f9a89d8743fa477c52ce9b7817dcad95
itsnikhil commented
I think this is more of a feature
https://github.com/thenewboston-developers/Bank/blob/master/v1/third_party/rest_framework/pagination.py#L11