How to call one method from another method in Meteor.methods({})?

How to call one method from another method in Meteor.methods({}).
Meteor.methods({
method1: function(){
return 10;
},
method2: function(){
a= this.method1();
},
});

Getting error can you help me how to do?

don’t know the answer to your question, but workaround is pretty easy :
Meteor.methods({
method1: function(){
method1Outside();
},
method2: function(){
a= method1Outside();
},
});
method1Outside = function(){
return 10;
}

2 Likes

Just use Meteor.call() as you would on the client :slight_smile:

2 Likes