-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
null?discordId=
filter behaviour not consistent for admin/manage/users
#1918
Comments
@jxckUK just to make sure, you want support for |
also, from looking at the code for |
This is already supported it seems just without the null?discordId= string, should be consistent on all three routes, either way is personally fine with me? Users should only ever return one result, it shouldn't allow multiple accounts to share the same Discord or Steam identifiers. |
users is plural so i assumed it included many, my apologies im trying to get familiar with the codebase its been a while. i see what you mean now, with i could go ahead and make them follow the same pattern as @MarshyMelloow im down to do this fullstack but want you opinion as you are the primary maintainer |
The path |
Hmm odd - I tested locally and that route will correctly filter on Discord ID at present without any changes so I assume it has logic to filter both without explicit strings in the request. This is what all the routes should do and for legacy compatibility the null?discordId= string should remain a possible filter for the routes. |
Go for it @subtosharki! The more contributions the better! |
sounds good, its 11 pm so ill do it tomorrow |
What version of Node.js are you using?
18
What operating system are you using?
Ubuntu
What version of SnailyCAD are you currently using?
v1.78.4 aae52da
Describe the Bug
When trying to apply the same filter that works on the
admin/manage/units
andadmin/manage/citizens
routes on theadmin/manage/users
it returns a 404 error.I am aware that this can be achieved by v1/admin/manage/users/{discordId} but the behaviour not being consistent leads to confusion.
Expected Behavior
It should filter the users based on the filter query specified.
To Reproduce
Run a GET query against https://CADURL/v1/admin/manage/users/null?discordId=DISCORDID.
Running queries against https://CADURL/v1/admin/manage/units/null?discordId=DISCORDID or https://CADURL/v1/admin/manage/citizens/null?discordId=DISCORDID will work fine.
Original commit that adding this functionality: 43a6323
The text was updated successfully, but these errors were encountered: