-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add more valid filters for query to /sessions endpoint #97
Conversation
formatKeys(filter) { | ||
return Object.entries(filter).reduce((obj, [key, val]) => { | ||
const copy = { ...obj }; | ||
if (this._wrKeys.includes(key)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can set the key to wallet_registrations rather than _wrKeys and then having to reformat it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand your advice, can you please clarify?
Those particular keys need to be designated as related to the wallet_registrations table for the query to work. We could do a simple conditional to rename them, but addTableNames could be a utility fn() since we need to do similar transformations for getting the session count.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant just renaming '_wrkeys' to '_walletRegistrationKeys'
🎉 This PR is included in version 1.13.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Necessary change to allow filtering by session in the admin client.
Related to PR in query api: Greenstand/treetracker-query-api#276