I’m new to Meteor & trying to play with the methods. I’m trying to call a server only function inside one method.
Let’s say I would like to return user by username but wouldn’t want to expose all users db to the client.
let user = Accounts.findUserByUsername(username);
from server side, it prints the user object. But the client side I got the error which is pretty much expected for I knew Accounts is server only.
Exception while simulating the effect of invoking ‘test’ TypeError: Accounts.findUserByUsername is not a function(…) TypeError: Accounts.findUserByUsername is not a function
Any idea about how to design a pattern for similar situation?