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

Gets bad request when i pass any value with paramsForServer #590

Closed
GaborTorma opened this issue May 19, 2020 · 1 comment
Closed

Gets bad request when i pass any value with paramsForServer #590

GaborTorma opened this issue May 19, 2020 · 1 comment

Comments

@GaborTorma
Copy link

e.g.: `clients.find(
paramsForServer({
query: {
_id: '5ec10e63d3e4d3ad2cac4037'
},
$fastJoin: {
campaign: true
}
})
I get the following bad request message: "Invalid query parameter $client"

Missing $client from the @feathersjs adapter-commons filter-query.js/ts.
Working version:
exports.FILTERS = {
$sort: (value) => convertSort(value),
$limit: (value, options) => getLimit(parse(value), options.paginate),
$skip: (value) => parse(value),
$select: (value) => value,
$client: (value) => value
};

@fratzinger
Copy link
Collaborator

As stated in the docs, paramsForServer should be used with paramsFromClient: https://hooks-common.feathersjs.com/hooks.html#paramsfromclient

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants