Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

send back to server additional fields in 'params' besides 'query' #115

Closed
beeplin opened this issue Nov 17, 2016 · 4 comments
Closed

send back to server additional fields in 'params' besides 'query' #115

beeplin opened this issue Nov 17, 2016 · 4 comments

Comments

@beeplin
Copy link

beeplin commented Nov 17, 2016

Currently only params.query is sent back to server and other fields in params are discarded. I guess this is for avoiding conflicts when people try to send back fields like params.token or params.user which are already used for certain purposes. But it brings some inconveniences when we want to send additional information back to server (mostly used for hooks). Currently we have to put the additional information in query under some self-defined fields (like query.$populate etc.) and then on the server-side we have to use a self-defined before hook to extract the information out of the query object. The whole process seems awkward and unnatural.

So it would be wonderful if we also allow another certain field (could be named as params.options or something) sent back to server together with params.query. The field name (for example, options) is given, so we don't need to worry about conflicts.

@marshallswain
Copy link
Member

marshallswain commented Nov 17, 2016

It's a good idea to stick this in a separate key. I'd prefer that it were params.client or something that more explicitly states that those params aren't secure. This would at least save the step of having to create a hook to pull them off the query and stick them on hook.params.

@eddyystop
Copy link

I like client. I've been using clientParams.

On Thu, Nov 17, 2016 at 11:19 AM, Marshall Thompson <
notifications@github.com> wrote:

It's a good idea to stick this in a separate key. I'd prefer that it were
params.client or something that more explicitly states that those params
aren't secure.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#115 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABezn9ZtdJexj4Sb0DzSPXjY251IAJRAks5q_H6dgaJpZM4K1dSe
.

@daffl
Copy link
Member

daffl commented Nov 17, 2016

This is already being tracked with some good suggestions in feathersjs/feathers#304.

@daffl
Copy link
Member

daffl commented Nov 25, 2016

I'm going to close this as a duplicate of feathersjs/feathers#304 to keep all future discussion there. I'll definitely put this for the next release though.

@daffl daffl closed this as completed Nov 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants