Open
Conversation
Member
There was a problem hiding this comment.
We need a maximum on this value.
How about adding this line here:
limitCount = Math.min(limitCount, 100);
Member
|
Hey thanks for the pull request! This is good to merge after the maximum thing is addressed. |
Author
There was a problem hiding this comment.
Added the Maximum Value here to allow for a limit of a maximum of 100 matches.
Author
|
Hey @dy-dx I went ahead and did as you suggested. Please let me know if you see anything else you would like to see changed! Thanks for taking the time to look at the pull request! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was speaking with SizzlingCalamari about some things and this was one thing I suggested that he encouraged me to work with and do a pull request. I went ahead and allowed for a modifiable limiting factor when someone calls /api/matches. The user can choose /api/matches/3 if they only wanted the JSON to return 3 matches instead of the default 12. However if no matches are defined it should return with the default 12 matches. If something is wrong feel free to let me know.