Dear Meteorusers,
This is my first post on this forum, sorry if I do something wrong.
I want to build a protected room page. Only people that are signed in in that room in the Rooms collection my view the page. I build a check on the server called validRoom and that checks if the userId is in the array of the room he / she tries to enter.
The problem is that Flow Router doesn’t want async code in the triggerEnter.
I want it in routing because this will also check if someone tries to join the room directly when he / she is not allowed.
Am I missing something? does the check needs to be somewhere else? Currently I have the check on Template.room.onCreated(…) but I really dislike that, because the user has to render the page because he / she is told to f*ck off.
Hopefully you guys can help me,
Casper