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

A bogus command returns all resources instead of empty #90

Open
stain88 opened this issue Jul 25, 2018 · 8 comments · May be fixed by #99
Open

A bogus command returns all resources instead of empty #90

stain88 opened this issue Jul 25, 2018 · 8 comments · May be fixed by #99

Comments

@stain88
Copy link
Collaborator

stain88 commented Jul 25, 2018

This shouldn't really happen

@stain88 stain88 assigned stain88 and unassigned stain88 Jul 25, 2018
@stain88
Copy link
Collaborator Author

stain88 commented Jul 25, 2018

Oh, I see: no default case in the sortArguments, so it's not filtering by anything, so everything is kept.

@mndominguez
Copy link

I can work on this @stain88

@stain88 stain88 added the claimed label Oct 1, 2018
@stain88
Copy link
Collaborator Author

stain88 commented Oct 1, 2018

All yours @mndominguez

@mndominguez
Copy link

@stain88 do you think that the default case should include a push for each type of argument? If not, then I think the function should be broken down and refactored in four, one for languages, one for levels and so on.

@stain88
Copy link
Collaborator Author

stain88 commented Oct 2, 2018

I think a generic default could work: if you ask for something that "isn't there", regardless of whether it is language, level, type, then nothing should be returned.
Of course, that would mean being extremely harsh with typos, or other spellings.

@mndominguez
Copy link

Agreed. I just opened a PR.

@mndominguez mndominguez linked a pull request Oct 3, 2018 that will close this issue
@peoray
Copy link
Member

peoray commented Oct 5, 2018

When I type any language, even anyone that doesn't exist like vbmvb, it returns resources for python?

@stain88
Copy link
Collaborator Author

stain88 commented Oct 5, 2018

yeah this isn't complete yet, I'll rename the title

@stain88 stain88 changed the title /resources post java returns javascript resources A bogus command returns all resources instead of empty Oct 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants