meteor-restivus
meteor-restivus copied to clipboard
Restivus and asteroid
Hello,
It is more a question than an issue but i was wondering if it is possible when using restivus to mix it with a ddp connection.
My use case is a mobile application, I use restivus to provide a REST API, which is awesome, but i would like to have some screens of the app to be reactive.
Currently and thanks to #23 and #69, i was able to publish the entire collection with return Collection.find({})
and use asteroid to have a ddp connection but as the number of users grows, it is quite a pain to have all clients processing to see if updates concern them or not.
So i am looking for a way to do : return Collection.find({user_id : user_id})
, but the user_id
is only set on endpoints and not available outside them.
Of course, i do not want to pass user_id in Asteroid.subscribe(name, [user_id, param2, ...])
as it is insecure
So I am stuck wondering how to do this ?
Any help would be greatly appreciated