server-only-methods icon indicating copy to clipboard operation
server-only-methods copied to clipboard

How can we make this work for methods called from other methods?

Open monsterxxx opened this issue 10 years ago • 4 comments

For example, I want to Meteor.call('createUser') from another method, but don't want to let client call it straight from browser. In this case this.connection on server is not null. Thank you!

P.S. Currently I'm using function createUser declared in server/users.js without var keyword.

monsterxxx avatar Feb 24 '16 05:02 monsterxxx

+1

DylanKojiCheslin avatar Mar 10 '16 21:03 DylanKojiCheslin

Seems like storing your code in a fucntion instead of method is the only option.

avalanche1 avatar Apr 09 '16 15:04 avalanche1

Sorry for not responding! @avalanche1 is correct here.

themeteorchef avatar Apr 11 '16 18:04 themeteorchef

Yeah thx, function way is quite tolerable)

monsterxxx avatar Apr 11 '16 20:04 monsterxxx