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

server filter #9

Closed
fregux opened this issue Sep 5, 2013 · 2 comments
Closed

server filter #9

fregux opened this issue Sep 5, 2013 · 2 comments

Comments

@fregux
Copy link

fregux commented Sep 5, 2013

Je ne sais pas pourquoi, mais les filtres coté serveur ne marche pas:

la manière dont je l'utilise (app/controllers/car_controller.js):
req.applicationModels.GestDep_Car.dataTable(req.query, {_user_id: req.user._id}, function(err, data)

on remarque que le _user_id est bon (il change pour chaque utilisateur), mais il n'est pas pris en compte dans la requete.

@eherve
Copy link
Owner

eherve commented Sep 5, 2013

L'utilisation du filtre se fait via options.conditions
Tu devrais l'utiliser comme ça:
req.applicationModels.GestDep_Car.dataTable(req.query,
{ conditions: {_user_id: req.user._id} }, function(err, data)

On Thu, Sep 5, 2013 at 6:36 PM, fregux notifications@github.com wrote:

Je ne sais pas pourquoi, mais les filtres coté serveur ne marche pas:

la manière dont je l'utilise (app/controllers/car_controller.js):
req.applicationModels.GestDep_Car.dataTable(req.query, {_user_id:
req.user._id}, function(err, data)

on remarque que le _user_id est bon (il change pour chaque utilisateur),
mais il n'est pas pris en compte dans la requete.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9
.

Eric Herve

@fregux
Copy link
Author

fregux commented Sep 5, 2013

Parfait, ca marche niquel

@fregux fregux closed this as completed Sep 5, 2013
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