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

[FIX] Searching by undefined via REST when using query param #11657

Merged
merged 2 commits into from
Aug 20, 2018

Conversation

MarcosSpessatto
Copy link
Member

@MarcosSpessatto MarcosSpessatto commented Aug 2, 2018

Closes #11636
Closes #11599
Closes #11760

@@ -44,7 +44,7 @@ RocketChat.API.helperMethods.set('parseJsonQuery', function _parseJsonQuery() {
}
}

let query;
let query = {};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with this change I guess the test on line 58 isn't required anymore, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong, since JSON.parse('false'); can generate query = false;

@sampaiodiego sampaiodiego changed the title [FIX] Initializing query object(parseJsonQuery) with an empty object to avoid searches by undefined [FIX] Searching by undefined via REST when using query param Aug 20, 2018
@sampaiodiego sampaiodiego changed the title [FIX] Searching by undefined via REST when using query param [FIX] Searching by undefined via REST when using query param Aug 20, 2018
@sampaiodiego sampaiodiego merged commit 809055b into develop Aug 20, 2018
@sampaiodiego sampaiodiego deleted the fix-rest-users-list branch August 20, 2018 20:23
@sampaiodiego sampaiodiego mentioned this pull request Aug 28, 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 this pull request may close these issues.

4 participants